Profile first, then optimise (Surprising what you find with actual measurements...)


Biggest event of the day was discovering that 30% of total work in the system was being done in a __cmp__ method that was doing the equivalent of "if x is y" when everything was said and done. It appears, in the end, to have been the ultimate source of the slowdowns that I've spent days trying to work around. The system was doing 700,000 runs of this silly method for every discovery pass just to implement a linear search of a list.

Discovered another 18% of wasted work (after the 30% was taken out) in the OID-conversion code, but that only occurred in the demo/testing code, so no real-world benefit from it.

Other than that, lots of little bug-fixes and cleanups here and there. Rather a long day (again), but productive. I've managed to cram a whole extra day-and-a-bit of work into the week so far! May take much of tomorrow off to work on side-projects. Right now Shane's little get-together seems to have moved to the chatting phase, so I may go out and visit with them.

One thing that kept slapping me in the face. I need to figure out a better way of doing profiling. Loading a 20 minute profile run into the wxProfile2.py script takes more than an hour, and once it's loaded there's too little information to let you spelunk into the run properly.

Comments

Comments are closed.

Pingbacks

Pingbacks are closed.