Nmap Development mailing list archives

Re: GSoC idea


From: David Fifield <david () bamsoftware com>
Date: Sat, 27 Mar 2010 13:54:15 -0600

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
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: