import openpyxl performance

Issue #1254 resolved
Thomas R
created an issue

Hello,

Coming from a 2.2.1 openpyxl and upgrading to a 2.5.8 (tested as well with latest 2.6.2), I noticed a big performance drop in just importing openpyxl (without doing anything at all)

import time

t0=time.time() import openpyxl t1=time.time()

print 'LOAD in %s' % (t1-t0)

The older version gives: LOAD in 0.121558904648

The newer versions give: LOAD in 0.623511075974

Seems related to numpy imports, maybe other thing

Anyway to improve this ? In some scripts the import of openpyxl is now the #1 time consumer...

Thanks

Comments (1)

  1. CharlieC

    If you look at the codebase you'll see significant changes, not least the support for charts and pivot tables. This increase in functionality means a bigger library that takes longer to load and I suspect the use of a metaclass plays a small role. However, the load time of the library has been offset by significant performance increases when reading and writing files.

    Lazy loading could be implemented but is currently not on the roadmap.

  2. Log in to comment