Skip to content
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

Soft-wrap chunking for overly long lines #12532

Open
kirawi opened this issue Jan 14, 2025 · 0 comments
Open

Soft-wrap chunking for overly long lines #12532

kirawi opened this issue Jan 14, 2025 · 0 comments
Labels
A-core Area: Helix core improvements C-perf

Comments

@kirawi
Copy link
Member

kirawi commented Jan 14, 2025

#136 (comment)

Chunking overly-long lines. This can be done with only local calculations as well, including a search for a good break point (e.g. white space, or at least grapheme boundary) in the vicinity of the proposed chunk boundary. A soft line break is then made at the end of every chunk. This places an upper-bound on how far back the soft wrapping code needs to go: at worst, it's the length of a chunk. (In Led, the chunk size is hard-coded to 4096 chars, but it would be easy to make configurable.)

As legend goes, Pascal Kuthe had been working on this a few years ago until he accidentally overwrote all his work :p

@kirawi kirawi added A-core Area: Helix core improvements C-perf labels Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Helix core improvements C-perf
Projects
None yet
Development

No branches or pull requests

1 participant