uiwjs / uiwjs/react-md-editor

Input lag for large text body (>2000 lines)

Open
#230 5 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.9k
Forks
201
Avg merge
12m
Merged PRs (30d)
1

Description

Hey! I'm developing a text editor on top of this for a private project (I added some server-side processing for specific text macros, so one can add those text macros from the top toolbar or just writing them, save the text, and then a server will process that...).

The problem is that some of our text files are exceeding the 2000 lines and the editor became really slow at some point for similar large text sources (~500-1000ms input lag for each keystroke).

I've tried:

  • Remove all preview options
  • Hide preview (preview="edit")
  • Hide toolbar
  • Remove controlled input (i.e., testing the editor with no value nor orChange)
  • Revised my wrapper component for unnecessary rerenders (it doesn't re-render at all when value changes).

Is there some known limitation for such large texts? Any ideas of what may be causing this?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Start by reproducing the reported 500–1000 ms keystroke lag with text exceeding 2,000 lines, then compare the listed preview, toolbar, and controlled-input configurations. Done means identifying the cause and demonstrating that large-text editing no longer has the reported input lag.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.