Repository navigation
Chore/optimize - #10091
Merged
Merged
Chore/optimize#10091
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10091 +/- ##
==========================================
- Coverage 96.37% 96.3% -0.07%
==========================================
Files 63 63
Lines 9411 9424 +13
==========================================
+ Hits 9070 9076 +6
- Misses 341 348 +7
Continue to review full report at Codecov.
|
SimonSchick
force-pushed
the
chore/optimize
branch
from
October 29, 2018 23:35
6b0f6f0 to
72ecb9d
Compare
SimonSchick
force-pushed
the
chore/optimize
branch
from
November 1, 2018 11:52
29531a3 to
b5fee4f
Compare
Contributor
Author
|
Addressed all comments and squashed all commits since there isn't much point in keeping them separate anymore, waiting for CI build to pass now. |
Contributor
Author
|
@sushantdhiman we good now? |
SimonSchick
force-pushed
the
chore/optimize
branch
from
November 3, 2018 12:59
b5fee4f to
9d48cf0
Compare
Contributor
Author
|
done |
sushantdhiman
approved these changes
Nov 4, 2018
Contributor
|
Thanks @SimonSchick |
2 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request check-list
Please make sure to review and check all of these items:
npm run testornpm run test-DIALECTpass with this change (including linting)?Description of change
This PR does a couple of things (please advise if I should split this into separate PRs) that are all somewhat related.
Replace various operations with faster equivalents (contains some minor
else ifsimplification as well.Main component is the replacement of
_.memoizewhich was used to cache array lookups with shinySets. This also removes some dead code.While debugging and issue I got really frustrated with the amount of conditional nesting is going on
I reduced the amount of
return } else if (...)by roughly 50% (mostly using return instead).In
query.jsI also wrapped some promises that were doubled wrapped and nested for some reason, this code is drastically simpler nowThis broke stuff, I still moved the post query logic to a method to make it easier to read.NOTE: I switched the test reporter to
dotas that is slightly faster and doesn't create so much useless output, please mention if this is undesirable.Replaces all occurences of
new Bufferandsinon.sandbox.createand stubbed out (most) data-type related warnings that were spamming logs.Also refactoredNvm see nodejs/node#23960ABSTRACTprototype class to class since it's never directly instantiated.Previously forgot to port this :)