perf(statusTile): faster array creation and lodash lazy loading #335
Conversation
Codecov Report
@@ Coverage Diff @@
## master #335 +/- ##
==========================================
- Coverage 78.49% 77.52% -0.98%
==========================================
Files 30 30
Lines 479 485 +6
Branches 48 49 +1
==========================================
Hits 376 376
- Misses 89 94 +5
- Partials 14 15 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, congrats on your first PR on the repo!
} | ||
return flow; | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we will be able to revert this in a future PR if we implement babel-plugin-lodash? Or at least we can clean up a bit by implementing that import-lazy lib?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ya, I think there's a larger story to be tackled of "What's the pattern for lazy loading?".
This mirrors what's being used in main.js
, but it can become a bit verbose.
Another PR for import-lazy
would be interesting.
@haroldtreen Before I merge, can you rebase and then run |
563e257
to
900f5f9
Compare
Remove need for ES6 array polyfills and only import lodash once required re prettier#330
900f5f9
to
5f90f45
Compare
Wooo! Thanks for the speedy response @robwise 🙌 ! |
Description
Reduces the activation time for
prettier-atom
from 248ms down to ~60ms.Changes
atomInterface
. This stopsbabel-runtime
from requiring large polyfills (babel-runtime/helpers/toConsumableArray
). Saves ~70ms.lodash/fp/flow
ineditorInterface
. This function is only used forgetCurrentDir
, but gets loaded whenevereditorInterface
is loaded anywhere. Save ~120ms.