Nmap Development mailing list archives

Ndiff performance improvements


From: Henri Doreau <henri.doreau () gmail com>
Date: Fri, 21 Dec 2012 23:44:33 +0100

Hello,

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).

Regards

-- 
Henri

Attachment: ndiff_xml_callbacks.patch
Description:

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

Current thread: