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

refine reconciliation algorithm of array #960

Merged
merged 2 commits into from
Aug 20, 2018

Conversation

liuqiang1357
Copy link
Contributor

@liuqiang1357 liuqiang1357 commented Aug 8, 2018

When I assign a array node with structural equalled values, nothing have been changed, but the observer of array is still called. I think this may cause some performance problem.

also fix issue: #928

@liuqiang1357 liuqiang1357 changed the title refine array reconciliation algorithm of array refine reconciliation algorithm of array Aug 8, 2018
@mweststrate
Copy link
Member

Hi @liuqiang1357 can you introduce some unit tests to demonstrate what problems this fixes? I think this PR might violate some internal assumptions so far, but not entirely sure yet :)

@liuqiang1357
Copy link
Contributor Author

Hi @mweststrate I have added unit tests for this.

@xaviergonz
Copy link
Contributor

@liuqiang1357 does this also solve unshifting as mentioned in the last comment of #928?

@liuqiang1357
Copy link
Contributor Author

@xaviergonz Yes, you can see it in the unit test.

@mweststrate
Copy link
Member

Thanks a lot @liuqiang1357, looking good!

@mweststrate mweststrate merged commit c910605 into mobxjs:master Aug 20, 2018
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.

4 participants