Nmap Development mailing list archives

Re: [Zenmap] Slow "Open" for large files


From: Fyodor <fyodor () nmap org>
Date: Wed, 11 Jun 2014 00:45:22 -0700

On Sun, Jun 8, 2014 at 5:58 AM, Jay Bosamiya <jaybosamiya () gmail com> wrote:


Some analysis showed that the Open option was using string concatenation
and this made the algorithm quadratic in time complexity. (Thanks Dan
for pointing out that string concatenation is slow in Python).

Modifying this to use StringIO immediately improves the speed. The same
file opened in under half a minute!!!


Great catch!  It's interesting how often the performance bottlenecks are
not where we expect them at all.  I'm hoping we'll have similar success
this summer stamping out some of Zenmap's memory hogging aspects.

Cheers,
Fyodor
_______________________________________________
Sent through the dev mailing list
http://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/


Current thread: