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.
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 ofParser
. This newly initialisedParser
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.