EditContext.text can be problematic from performance point of view
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 48
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
If the modified text becomes long and the JS side accesses .text regularly, maintaining the string may become slow and also use quite a bit memory and cause lots of memory churn.
On IRC @dandclark suggested
"we'll probably want to add an additional getText()/setText() that take a start index and a length or end index."
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the EditContext API and the issue's discussion of regular access to EditContext.text. Review the proposed getText()/setText() methods and their start-index and length or end-index arguments; done requires an agreed API change that addresses string maintenance and memory churn, but no files or tests are named.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html, javascript
- Domain
- api, performance, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100