Repository navigation
Conversation
This was referenced Sep 19, 2026
enzi221
force-pushed
the
perf/avoid-extra-encdec
branch
from
September 30, 2026 12:40
7a28ddf to
9ab6b8d
Compare
enzi221
force-pushed
the
perf/avoid-extra-encdec
branch
from
October 8, 2026 13:08
9ab6b8d to
b0aba18
Compare
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.
PR Checklist
Summary
editDisplaydoes not take nor output a JSON. Skips JSON encoding/decoding.Related Issues
None.
Changes
This enhances initial chat rendering time by over 30%. The exact percentage will vary by numbers of chat messages and Lua triggers.
In a Lua-heavy environment with 30 messages, it takes ~1.7s.
With this PR, it takes ~1.1s, which is a huge enhancement (34%).
Implementation details:
editDisplaytakes a raw string, and must output a raw string (else it dies withe.replace is not a functioneven without this PR, so not a breaking change). Since string is also a primitive in Lua, JSON conversion is unnecessary.Impact
None.