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

Expensive HTML parser setup runs on each key press in Android #887

Open
jonnyandrew opened this issue Nov 21, 2023 · 0 comments
Open

Expensive HTML parser setup runs on each key press in Android #887

jonnyandrew opened this issue Nov 21, 2023 · 0 comments

Comments

@jonnyandrew
Copy link
Contributor

Problem

On Android, an expensive HTML parser setup operation runs on each key press. This contributes to slow/laggy typing experience which is particularly visible in debug builds.

Proposed solution

Currently, each time the composer model changes, the Android platform code creates a new instance of HtmlToSpansParser which in turn creates a new instance of Parser. This newly initialised Parser then runs an expensive setup operation because it has not parsed any content before.

Improve the efficiency of the editor by holding a reference to some of these objects and reusing them.

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

No branches or pull requests

2 participants