Re: [Pyparsing] Parsing large files using SkipTo is slow.
Brought to you by:
ptmcg
From: Paul M. <pt...@au...> - 2011-09-12 12:48:11
|
Max - The FTP link you posted does not respond for me. Can you try posting code and any ASCII files at pastebin.com? -- Paul -----Original Message----- From: Max...@dl... [mailto:Max...@dl...] Sent: Monday, September 12, 2011 6:06 AM To: pyp...@li... Subject: [Pyparsing] Parsing large files using SkipTo is slow. Hello, I am trying to parse a simple CAD file using pyparsing, where the grammar is quite simple and most of the lines of the file are supposed to be skipped. However this is still slower than I would expect it to be. The parser is in the parse_iv.py file, the CAD file is the screwdriver_2.iv and the CProfile result is th err file. It seems like parseString is called for each line. I don't understand the internal workings of pyparsing but would it be possible to use something like file.index( skiptostr ) to speed things up? ftp://ftp.robotic.dlr.de/outgoing/Argus/ BR, Max ---------------------------------------------------------------------------- -- Doing More with Less: The Next Generation Virtual Desktop What are the key obstacles that have prevented many mid-market businesses from deploying virtual desktops? How do next-generation virtual desktops provide companies an easier-to-deploy, easier-to-manage and more affordable virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/ _______________________________________________ Pyparsing-users mailing list Pyp...@li... https://lists.sourceforge.net/lists/listinfo/pyparsing-users |