Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚡ Improve perf on core functions #315

Merged
merged 4 commits into from
Nov 30, 2018
Merged

⚡ Improve perf on core functions #315

merged 4 commits into from
Nov 30, 2018

Conversation

nlepage
Copy link
Member

@nlepage nlepage commented Nov 30, 2018

Issue : fix #310

frinyvonnick
frinyvonnick previously approved these changes Nov 30, 2018
Copy link
Contributor

@frinyvonnick frinyvonnick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to have a custom apply function for internal purpose ?

@codecov-io
Copy link

codecov-io commented Nov 30, 2018

Codecov Report

Merging #315 into dev will decrease coverage by 2.32%.
The diff coverage is 65.38%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #315      +/-   ##
==========================================
- Coverage   99.15%   96.83%   -2.33%     
==========================================
  Files         107      107              
  Lines         357      379      +22     
==========================================
+ Hits          354      367      +13     
- Misses          3       12       +9
Impacted Files Coverage Δ
packages/immutadot/src/lang/add.js 100% <100%> (ø) ⬆️
packages/immutadot/src/core/set.js 100% <100%> (ø) ⬆️
packages/immutadot/src/core/get.js 100% <100%> (ø) ⬆️
packages/immutadot/src/core/apply.js 62.5% <59.09%> (-37.5%) ⬇️

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 8801223...71b9626. Read the comment docs.

@nlepage
Copy link
Member Author

nlepage commented Nov 30, 2018

Even better, I wrote an apply that actually has good perfs, provided you specify when the updater has a fixed arity.

packages/immutadot/src/core/apply.js Outdated Show resolved Hide resolved
packages/immutadot/src/core/apply.js Outdated Show resolved Hide resolved
@nlepage nlepage merged commit 40e6311 into dev Nov 30, 2018
@nlepage nlepage deleted the fix/310 branch November 30, 2018 12:15
@nlepage nlepage added this to the 2.0 milestone Nov 30, 2018
nlepage added a commit that referenced this pull request Jan 22, 2019
* ⚡ Start investigating performance drop...

* ⏪ Do not use apply in core functions for performance

* ⚡ Apply version that actually has good perf

* 👌 Review @frinyvonnick
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants