From: Adam T. <a-t...@st...> - 2006-03-22 00:11:21
|
> Got it. Works fine, although doesn't play well with the logger, but you > can turn the logger off or get it to write to a file. Yeah. This is done with calling G03 with a third argument of logging.ERROR or such. > I don't know where the slow step is. I've added a call to random so that > it only calls it every so many steps, but there isn't a massive > improvement. I also added optional arguments to parse so that you can specify how "fine" or "course" you want the update to be. The first option is the fine argument, which is used for checks against random() inside "slow" parts like parsing overlap and coefficients. The second option is the course argument, which is used for checks that aren't "slow". > Not really. I think this is the price you pay. A bit like Heisenberg's > uncertainty principle - by observing the progress you change it. :-) If > we could identify more clearly the slow step - for example, is it the > call to tell()? - then we could think about how to improve it. I tried > various things to speed up the textprogress, but they only made a minor > difference. I agree that it is probably the price we pay. I've tried numerous things to speed it up, but nothing seems to be too significant. I think I'd rather know the progress and add on (at most) a few seconds, and of course, it's ultimately up to the developer using cclib. > BTW, you may be interested in: > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/299207 > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/168639 I didn't exactly take their work, but I did figure out how to make the text progress work like is expected. I haven't finished every part of it, but it should still be useful. Of course, the text progress is more an example for people to follow. I just wanted to establish the API used for any progress classes. Basically two functions need to be implemented: 1) initialize, which expects nsteps and text 2) update, which expects step and text I've also added a few test files for ADF, although I haven't started working on the parser. Such a daunting task! Adam |