-
-
Notifications
You must be signed in to change notification settings - Fork 897
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
[feature] Node#wrap
should accept a Node
#2657
Labels
Milestone
Comments
flavorjones
added a commit
that referenced
this issue
Nov 14, 2022
Duplicating an instantiated Node is significantly faster than re-parsing a string for multiple invocations. Closes #2657
flavorjones
added a commit
that referenced
this issue
Nov 15, 2022
Duplicating an instantiated Node is significantly faster than re-parsing a string for multiple invocations. Closes #2657
flavorjones
added a commit
that referenced
this issue
Nov 15, 2022
Duplicating an instantiated Node is significantly faster than re-parsing a string for multiple invocations. Closes #2657
flavorjones
added a commit
that referenced
this issue
Nov 15, 2022
Duplicating an instantiated Node is significantly faster than re-parsing a string for multiple invocations. Closes #2657
flavorjones
added a commit
that referenced
this issue
Nov 15, 2022
Duplicating an instantiated Node is significantly faster than re-parsing a string for multiple invocations. Closes #2657
flavorjones
added a commit
that referenced
this issue
Nov 16, 2022
Duplicating an instantiated Node is significantly faster than re-parsing a string for multiple invocations. Note that we now also explicitly use the node's `parent` as the context node for parsing markup, if it exists. Closes #2657
flavorjones
added a commit
that referenced
this issue
Nov 16, 2022
Duplicating an instantiated Node is significantly faster than re-parsing a string for multiple invocations. Note that we now also explicitly use the node's `parent` as the context node for parsing markup, if it exists. Closes #2657
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What problem are you trying to solve?
Currently
Node#wrap
only accepts a string which is parsed as a fragment. For some use cases where many nodes are being wrapped, this is about 2x slower than simply using an existingNode
object.I think
Node#wrap
should be able to accept aNode
argument, which is duplicated for use instead of forcing callers to pass a String and suffer the performance penalty of invoking the parser.Please show your code!
Benchmarks:
The text was updated successfully, but these errors were encountered: