Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Change the line parsing and storage approach to reduce the overall line processing time#3975

Draft
JoeKar wants to merge 5 commits intomaster from
performance/rune-lines
Draft

Change the line parsing and storage approach to reduce the overall line processing time #3975
JoeKar wants to merge 5 commits intomaster from
performance/rune-lines

Conversation

@JoeKar
Copy link
Member

@JoeKar JoeKar commented Jan 25, 2026
edited
Loading

The intention came up out of the discussion for #3127.
We realized that the line is processed multiple times as bytes to receive the resulting runes and their count.

This can be significantly reduced by storing already the decoded runes per line while parsing that line the first time. Afterwards this line doesn't need to be decoded again and the count can be accessed by a simple usage of len().

Since this is a huge rework and change of one of the basics it might brake one or more interfaces used by plugins.

The change is still ongoing and a lot of depending functionalities need to be changed. So please expect rebases from time to time.
I created the PR anyway since a lot of very important discussion was already ongoing within #3127 which shall be continued in here to keep the former one clean now.

In case someone else likes to support here then please provide PRs to performance/rune-lines as base branch and we can apply them.

BTW:
make test runs successfully already.

This PR will continue #3149.

Copy link
Member Author

JoeKar commented Jan 25, 2026

@dmaluka
You should now be able to work directly at performance/rune-lines, in case you find some time to do so. 😉
A lot of work is still present to exchange these LineBytes() and util.CharacterCount() accesses + the stuff I missed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /