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

vtree/diff: combine unhook and destroyWidget to use a single walk #446

Closed
wants to merge 2 commits into from
Closed

vtree/diff: combine unhook and destroyWidget to use a single walk #446

wants to merge 2 commits into from

Conversation

nishanths
Copy link

I was reading this over the weekend and came across the following TODO in clearState, which seemed like a worthwhile thing to address.

// TODO: Make this a single walk, not two
unhook(vNode, patch, index)
destroyWidgets(vNode, patch, index)

However, I have no context on whether this change will result in a measurable performance improvement. I'm happy to add benchmarks, if necessary.

// - Add patch records for destroyed widgets. This is required because we
// need a DOM node reference for the destroy function.
// - Execute hooks when two nodes are identical.
function clearState(vNode, patch, index) {
Copy link
Author

Choose a reason for hiding this comment

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

Moved this to the bottom to make the diff less messy.

On master, travis fails currently with the following error:

    ERROR: npm is known not to run on Node.js v0.12.18
    You'll need to upgrade to a newer version in order to use this
    version of npm. Supported versions are 4, 6, 7, 8, 9. You can find the
    latest version at https://nodejs.org/

This updates .travis.yml to use the latest stable node ('node')
and all the latest LTS releases ('lts/*'). The relevant docs are at
https://docs.travis-ci.com/user/languages/javascript-with-nodejs/#Specifying-Node.js-versions
@nishanths
Copy link
Author

One of the commits in this branch, 269cccb, is from #447. I can rebase this branch once #447 is merged.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.04%) to 97.491% when pulling 8e9d942 on nishanths:nishanths/walk into 947ecf9 on Matt-Esch:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.04%) to 97.491% when pulling 8e9d942 on nishanths:nishanths/walk into 947ecf9 on Matt-Esch:master.

@nishanths nishanths closed this Dec 11, 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.

None yet

2 participants