Web-Editor chokes on larger texts (performance issue)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 659
- Forks
- 133
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 110
Description
Describe the bug
Editing (e.g. marking a word and making it bold) is slowed down significantly, when the text is big.
To Reproduce
- Visit NextCloud in browser
- Click on "New Text Document" and enter a name
- Copy a larger chunk of text
3.1. e.g. visit https://en.wikipedia.org/wiki/History_of_England, CTRL+A to mark all text, CTRL+C to copy
3.2. CTRL+V a couple of times in nextcloud - Mark a word and click on b/bold
- Alternatively, mark all text in the markdown viewer (e.g. mouse-based, or CTRL+A) and do the same.
(Notice the lags.)
Nextcloud version: 18.0.6
Browser log
In my case, the sync POST request shows ~1 KB of data. After clicking on the "make bold" icon, it takes a second until the text is displayed in bold (and a 806 byte push event). The longer the text, the more laggy does the UI seem to be. I had a user jump back to google docs because of that :( . The same text felt snappier in Collabora Online/Office.
It seems that the lags occur through client based processing, as push event is shown in the network log only after the second(s) of delay, but here I do not have enough insights into how and when the logging is done (only after all processing?).
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
Reproduce the lag in the browser editor by pasting a large text and applying bold, then inspect the browser log and network activity around the delayed sync POST and push event. Trace the client-side processing triggered by the bold action. Done means large documents remain responsive while formatting and the related events still complete correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100