refactor: add Params.resetZdm() to avoid double call on foreign object#5829
Merged
jerch merged 1 commit intoxtermjs:masterfrom Apr 23, 2026
Merged
refactor: add Params.resetZdm() to avoid double call on foreign object#5829jerch merged 1 commit intoxtermjs:masterfrom
jerch merged 1 commit intoxtermjs:masterfrom
Conversation
…ngle call Replaces 10 separate reset()+addParam(0) pairs across the parser with a single resetZdm() method that inlines both operations, avoiding two calls to a foreign object per sequence reset.
Contributor
Author
|
@jerch as discussed |
jerch
approved these changes
Apr 23, 2026
Member
jerch
left a comment
There was a problem hiding this comment.
LGTM 👍 , thanks for the cleanup work.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up from #5825, collapses the
reset()+addParam(0)pattern into a singleresetZdm()method onParams.The parser calls this pair 10 times across different code paths. Having it as one method avoids two separate calls to a foreign object per sequence reset.
No perf change expected (confirmed with benchmarks), just a cleanup.