brisvag / blik

Python tool for visualising and interacting with cryo-ET and subtomogram averaging data.
https://brisvag.github.io/blik/
GNU General Public License v3.0
23 stars 8 forks source link

delay imports for speedup #113

Closed brisvag closed 3 years ago

brisvag commented 3 years ago

These small changes, combined with the bigger ones at https://github.com/napari/napari/pull/2662, drastically improve import speed as a module. More importantly, something as simple as peep -h is now decently fast.

codecov[bot] commented 3 years ago

Codecov Report

Merging #113 (b51d3e6) into master (c935b4e) will decrease coverage by 0.05%. The diff coverage is 62.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #113      +/-   ##
==========================================
- Coverage   84.30%   84.24%   -0.06%     
==========================================
  Files          93       93              
  Lines        2096     2101       +5     
==========================================
+ Hits         1767     1770       +3     
- Misses        329      331       +2     
Impacted Files Coverage Δ
peepingtom/__main__.py 79.41% <33.33%> (-2.41%) :arrow_down:
peepingtom/depictors/napari/naparidepictor.py 82.35% <80.00%> (-0.99%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1847608...b51d3e6. Read the comment docs.

brisvag commented 3 years ago

That's where the upstream speedup happened, and othwerise everything seems to work fine with the latest release!