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

pref: improve traverse #912

Merged
merged 3 commits into from Aug 16, 2019
Merged

pref: improve traverse #912

merged 3 commits into from Aug 16, 2019

Conversation

fisker
Copy link
Contributor

@fisker fisker commented Jun 24, 2019

this PR should speed up the node traverse, improves #910

@fisker
Copy link
Contributor Author

fisker commented Jun 28, 2019

cc @mysticatea

@ota-meshi
Copy link
Member

I don't like this way of throwing an error because it looks like a trick.
I think that it is good to add API to break to traverseNodes.

@fisker
Copy link
Contributor Author

fisker commented Aug 12, 2019

@ota-meshi traverseNodes is require("vue-eslint-parser").AST.traverseNodes, there is no api to break for now, I think throw is the best I can do.

If this is not OK, I can still add result and parent check to avoid nest loop, should be better than the original implementation.

Copy link
Member

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

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

Thank you for changed this PR. LGTM!

@kazupon kazupon merged commit d822a03 into vuejs:master Aug 16, 2019
@vue-bot
Copy link

vue-bot commented Aug 16, 2019

Hey @fisker, thank you for your time and effort spent on this PR, contributions like yours help make Vue better for everyone. Cheers! 💚

@fisker fisker deleted the improve-traverse branch August 24, 2019 11:45
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

4 participants