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

Optimize node ancestor checks #84

Merged
merged 1 commit into from
Nov 17, 2017

Conversation

tvasenin
Copy link
Contributor

Eliminate String.split() and compare position strings directly.

Gives huge performance boost when handling lots of nodes, e.g.
https://react-component.github.io/tree-select/examples/big-data.html

Eliminate String.split() and compare position strings directly.

Gives huge performance boost when handling lots of nodes, e.g.
https://react-component.github.io/tree-select/examples/big-data.html
@codecov-io
Copy link

Codecov Report

Merging #84 into master will increase coverage by 0.58%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #84      +/-   ##
==========================================
+ Coverage   81.86%   82.44%   +0.58%     
==========================================
  Files           7        7              
  Lines         623      621       -2     
  Branches      195      194       -1     
==========================================
+ Hits          510      512       +2     
+ Misses        110      106       -4     
  Partials        3        3
Impacted Files Coverage Δ
src/Select.jsx 79.36% <0%> (+0.77%) ⬆️
src/util.js 95.65% <100%> (+0.19%) ⬆️

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 50a421f...0fb117a. Read the comment docs.

@yesmeck yesmeck merged commit c2fee18 into react-component:master Nov 17, 2017
@yesmeck
Copy link
Member

yesmeck commented Nov 17, 2017

Thanks!

@tvasenin tvasenin deleted the fix-performance-isInclude branch November 17, 2017 09:21
@tvasenin
Copy link
Contributor Author

@yesmeck I see that a new version of tree component (v1.7.9) has already been uploaded to NPM.

Could you, please, also release new tree-select component?

@yesmeck
Copy link
Member

yesmeck commented Nov 17, 2017

Released 1.12.1

@tvasenin
Copy link
Contributor Author

tvasenin commented Nov 20, 2017

@yesmeck could you please, also bump rc-tree dependency (and release new rc-tree-select version with fixed dependency)?
Should be "rc-tree": "~1.7.9" (version with performance fix) instead of "rc-tree": "~1.7.1".

@yesmeck
Copy link
Member

yesmeck commented Nov 20, 2017

rc-tree-select will use rc-tree@1.7.9 if you reinstall it ?

@tvasenin
Copy link
Contributor Author

tvasenin commented Nov 20, 2017

Yes, npm update rc-tree-select updates latest rc-tree too.

Still, for some reason, the example page uses old rc-tree dependency for some reason:
https://react-component.github.io/tree-select/examples/big-data.html

Thus, I assume, the safest way would be to declare the minimum required version explicitly.

@yesmeck
Copy link
Member

yesmeck commented Nov 20, 2017

I'v just updated the example pages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants