a blog by Marius Gedminas

Posts tagged Python

Foliage sprint day 2

Stephan Richter convinced me to try the ZCML optimization task. Zope 3 parses and interprets hundreds of little ZCML configuration files on startup. The idea was that if we can cache pre-parsed configuration on disk, we could speed up Zope 3 startup by 30–50%. I originally tried this approach back in 2004 but couldn't get it to work. Today, thanks to Stephan Richter, who took over the most boring and difficult parts (making view directives pickleable), we got to a point where Zope 3 works after loading the configuration pickle instead of parsing ZCMLs (and starts up in 2 seconds instead of 3).

Post-EuroPython 2007 sprint day 2

Previous entry. During the second day I refactored the Zope 3 test runner to make nearly all of its output go through a single OutputFormatter class (in the output-refactoring branch), then created a subclass of it that uses ANSI color codes to highlight error messages (in the colorized-output branch). I've had this luxury before, and I can attest that it does increase productivity (being able to spot filenames and line numbers between several-hundred-line diffs produced by testbrowser tests is invaluable).