Ticket #91 (closed Defect: fixed)

Opened 6 years ago

Last modified 6 years ago

GeoEco modules are very slow to import

Reported by: jjr8 Owned by: jjr8
Priority: Medium Milestone: 0.3
Component: Core - Metadata & Types Version: 0.2
Keywords: Cc:

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.

Change History

Changed 6 years ago by jjr8

  • status changed from new to assigned
  • component changed from Core - Other to Core - Metadata & Types
  • description modified (diff)

Changed 6 years ago by jjr8

  • status changed from assigned to closed
  • resolution set to fixed

Fixed in MGET 0.3.

Note: See TracTickets for help on using tickets.