28 Mar 2001 ianb   » (Journeyer)

dyork: (tree program) os.path might use statcache, I don't know, but you may be able to optimize your code by using os.stat instead of islink, and isdir. It also would be more correct, as your current program seems to treat all symbolic links as directories. I think it's certain to save at least a little speed, maybe a fair amount (since stat's disk access is probably the biggest performance issue). Also, it's nearly as easy to pass the full path (relative to cwd or not) as it is to change directories, and this will probably also be a little faster. I think this is a case where the smallest version of the program you can write will be the fastest (as long as that means that each file gets stat()ed only once).

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!