Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants