DescriptionDon't create multiple WebRange objects for getting selection text.
Editable HTML content is very laggy when it is relatively large. Lag
is caused by creation of WebRange object with given location and offset.
Bigger the editable content and farther the location, the more the lag.
Currently we create WebRange object twice - once for checking presence
of text (plain) and again for fetching actual plain text. It causes the
lag to double the actual value. This patch removes unneccessary double
creation of WebRange.
Sample page and traces showing the lag and improvement with this patch
are attached with the bug.
BUG=396051
R=avi,jochen,yosin
TBR=jochen
TESTS=None
Committed: https://crrev.com/c38791ac14cf1a9b3dd991d9a8cff558e3ce4d00
Cr-Commit-Position: refs/heads/master@{#308261}
Patch Set 1 #
Messages
Total messages: 16 (5 generated)
|