Nmap Development mailing list archives

Re: Ndiff performance improvements


From: David Fifield <david () bamsoftware com>
Date: Sat, 22 Dec 2012 23:10:58 -0800

On Fri, Dec 21, 2012 at 11:44:33PM +0100, Henri Doreau wrote:
please find attached a patch for ndiff that changes the way XML
elements are handled. Instead of doing a long if/elif/else check for
each element, I have added two dicts associating element names to
callbacks (one dict to handle start_ and one to handle end_ handlers).
The aim was to improve performance.

New version takes 2 seconds less to process a 115MB file (1:04.52 vs
1:06.65 unpatched).

Okay, but kill the empty docstrings.

David Fifield
_______________________________________________
Sent through the dev mailing list
http://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/


Current thread: