Skip to content

refactor: add Params.resetZdm() to avoid double call on foreign object#5829

Merged
jerch merged 1 commit intoxtermjs:masterfrom
homanp:perf/reset-zdm
Apr 23, 2026
Merged

refactor: add Params.resetZdm() to avoid double call on foreign object#5829
jerch merged 1 commit intoxtermjs:masterfrom
homanp:perf/reset-zdm

Conversation

@homanp
Copy link
Copy Markdown
Contributor

@homanp homanp commented Apr 23, 2026

Follow-up from #5825, collapses the reset() + addParam(0) pattern into a single resetZdm() method on Params.

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.

…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.
@homanp
Copy link
Copy Markdown
Contributor Author

homanp commented Apr 23, 2026

@jerch as discussed

Copy link
Copy Markdown
Member

@jerch jerch left a comment

Choose a reason for hiding this comment

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

LGTM 👍 , thanks for the cleanup work.

@jerch jerch added this to the 7.0.0 milestone Apr 23, 2026
@jerch jerch enabled auto-merge April 23, 2026 15:03
@jerch jerch merged commit 7fe89a1 into xtermjs:master Apr 23, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants