Comment 10 for bug 207604

Revision history for this message
Petr Machata (pmachata) wrote :

Instead of building a list of pre-defined timezones and then sifting through to discard any that are not on disk (i.e. doing 500+ opens, that's what's in the trunk), I build the list by traversing system hierarchy (i.e. doing a couple opens that don't end up in exceptions). Common zones are loaded from zone.tab. I don't really know what you try to achieve, so this may not help you at all.

I'm attaching a patch that defers the loading of all_timezones and all_timezones_set until the first access. It applies on top of the first patch. This cuts off another ~50% of the import time. I haven't tested that very much though, and I'm afraid whether the lazy collections successfully enough mimic their eager counterparts.