From: Adam T. <a-t...@st...> - 2006-03-09 20:03:32
|
So I added an example progress class called TextProgress which basically prints out bars saying how much progress has been made, and made necessary changes to G03 parser to allow use of this class. If you want to use it, first create an instance, and pass that instance to the G03 class along with the filename: progress=TextProgress() p=G03(filename,progress) p.parse() I changed the __init__ function of G03 to accept any amount of arguments, and pass that onto the baseclass. See the SVN diffs for more details. This allows the user of cclib to not specify a parser and continue as before. Unfortunately, not all of this message is good news. Calling G03 with a TextParser adds a 20-25% overhead: 4 seconds becomes 5ish, 21 seconds becomes more like 26, etc. I think the problem is that it calls the progress.update(step) far too frequently. It may make more sense to identify the slower parts of the parsing class, and only add progress.update there, but I don't know for sure. Any ideas on how to improve this? Adam -- Want a web browser that is fully customizable? Go to http://www.mozilla.org/products/firefox/ to download the newest version of Firefox and its available extentions. |