steelbrain / package-deps

Automatically install dependencies for your atom packages
MIT License
59 stars 20 forks source link

Lazy load #270

Closed aminya closed 4 years ago

aminya commented 4 years ago

Because many packages depend on package-deps, I think this optimization will benefit the whole Atom ecosystem.

This is tested and works as expected. It reduces the load time of a test package by 12ms (using require("atom-package-deps").install): before 2020-05-05 22_33_27-Timecop — C__Users_yahyaaba_Documents_GitHub_JavaScript_atom-ide-community_atom- after 2020-05-05 22_37_29-Timecop — C__Users_yahyaaba_Documents_GitHub_JavaScript_atom-ide-community_atom-

Small other changes:

aminya commented 4 years ago

Any feedback on this? This is ready

steelbrain commented 4 years ago

Thank you for working on this, looks good, I'll review/merge this weekend

aminya commented 4 years ago

By targeting electron 5, package-deps is now even faster.

aminya commented 4 years ago

@steelbrain Any update on this? This is a small change. I just moved the code to different files, and I used dynamic import in the main file.

steelbrain commented 4 years ago

I'll review within the next 24 hours :)

steelbrain commented 4 years ago

Applied some touchups in https://github.com/steelbrain/package-deps/pull/281

aminya commented 4 years ago

Awesome!