Nmap Development mailing list archives

Re: GSoC idea


From: dave b <db.pub.mail () gmail com>
Date: Sun, 28 Mar 2010 11:33:00 +1100

On 28 March 2010 06:54, David Fifield <david () bamsoftware com> wrote:
On Sun, Mar 28, 2010 at 05:48:50AM +1100, dave b wrote:
Make zenmap use *less* memory and be faster.

Currently if there are 4094 hosts (and only performing a service scan
on two ports) in an nmap xml scan file, 800mb + of memory can easily
be used.

I think reducing memory usage in Zenmap is a good goal. We've added a
lot of capabilities to it and haven't been measuring the impact on
memory usage.

By moving zenmap to cElementTree massive amounts of memory should be
saved in cases where there is a large number of hosts. This should
hopefully also make zenmap faster in these cases.

Can you substantiate your claim that cElementTree will use less memory
than the SAX parser we use now? cElementTree, it seems, is going to
build a complete representation of the XML tree in memory, while our SAX
parser only looks at one fragment at a time. I doubt that XML parsing is
the biggest user of memory; it's probably the size of the structures
Zenmap builds from the XML (in which case changing parsers would not
help anything). A good first step for someone interested in reducing
memory usage would be to find a Python memory profiler and use it.

David Fifield


No I can't substantiate those claims because I haven't been through
the zenmap code yet. You may be correct that it isn't the xml parsing.
So yes I think reducing the memory that zenmap uses would be a good
goal. imho the xml parsing is probably a good place to start
profiling.
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: