Ticket #91 (closed Defect: fixed)
GeoEco modules are very slow to import
|Reported by:||jjr8||Owned by:||jjr8|
|Component:||Core - Metadata & Types||Version:||0.2|
Description (last modified by jjr8) (diff)
Over 50% of the code in most GeoEco modules are calls to functions to add metadata to the module, classes, properties and methods. This code seems to take quite a long time to execute. For example, on my laptop it takes over 25 seconds to import the GeoEco.DataProducts.NOAA.CoastWatchAVHRR module, with the CPU pegged at 100% for the whole time. This particular one is an extreme case, because it import so many other GeoEco modules.
In the grand scheme of things, this is not too big of a deal. The module only has to be imported once for the lifetime of the executing Python script. The load time will be amortized to almost nothing for long and complex scripts that do a lot of processing. But it is certainly off-putting to other developers. The design is just not efficient and must be improved.
I need to profile the code a bit and address any low-hanging fruit. If that is not sufficient, the metadata system needs to be changed to load it on demand, or something equivalently radical.