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

Performance: check out ParentNode.children instead of Node.childNodes #126

Closed
matatk opened this issue Nov 23, 2017 · 0 comments
Closed
Assignees
Milestone

Comments

@matatk
Copy link
Owner

matatk commented Nov 23, 2017

@BillyRayPreachersSon suggested I check out ParentNode.children instead of Node.childNodes so that I can remove the check for each node being visited being an element node. Perhaps the check for the existence of the element could be skipped too.

Note also that it's an HTMLCollection, so a normal for loop will need to be used (may well also speed up the code as currently it's a forEach function-calling loop).

@matatk matatk added this to the 2.2.0 milestone Nov 23, 2017
@matatk matatk self-assigned this Nov 23, 2017
@matatk matatk modified the milestones: 2.3.0, next, 2.4.0 May 10, 2018
@matatk matatk modified the milestones: 2.4.0, 2.5.0 Sep 4, 2018
@matatk matatk modified the milestones: 2.5.0, 2.4.x Dec 6, 2018
@matatk matatk closed this as completed in badac44 Dec 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant