New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 799640 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 3
Type: Bug

Blocking:
issue 698661



Sign in to add a comment

DeleteSelectionCommand::RemoveNode() updates layout for every removed node

Reported by msaoffic...@gmail.com, Jan 5 2018

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36

Example URL:
https://jsfiddle.net/hukapcfc/1/

Steps to reproduce the problem:
1. Go to https://jsfiddle.net/hukapcfc/1/
2. Select the majority of the text (for ex: from the 2nd character in the very first word to a character in the middle of the very last word)
3. Press any key to overtype (or press backspace/delete to delete completely)
4. You will see that it takes a few seconds before the paragraph is updated.

What is the expected behavior?
No lag in between pressing a key and seeing the paragraph correctly reflect the update. 

What went wrong?
The browser seems to be doing a lot of recalculating the style and redoing the layout (seems to be correlated to the # of spans). See attached files for images of the profile related to the linked JSFiddle repro. 
This works without the performance lag in IE, Edge, and Firefox.

Does it occur on multiple sites: N/A

Is it a problem with a plugin? N/A 

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 63.0.3239.132  Channel: stable
OS Version: 6.3
Flash Version: 

Repro exists on the most recently updated version of Chrome (Version 63.0.3239.132)
 
chrome_issue_pic1.JPG
91.3 KB View Download
chrome_bug_zoomed_in_view.JPG
106 KB View Download
Cc: sc00335...@techmahindra.com
Components: Blink>Layout
Labels: -Pri-2 -Type-Compat hasbisect-per-revision Triaged-ET M-65 Needs-Triage-M63 OS-Linux OS-Mac Pri-1 Type-Bug-Regression
Owner: xiaoche...@chromium.org
Status: Assigned (was: Unconfirmed)
Reporter@ Thanks for the issue.

Able to reproduce this issue on Windows 10, Mac OS 10.12.6 and Ubuntu 14.04 on the latest Canary 65.0.3315.0 and Stable 63.0.3239.132 by following the steps mentioned in the original comment.

Bisect Information:
====================
Good Build: 56.0.2889.0 (Revision - 424926)
Bad Build : 56.0.2890.0 (Revision - 425218)

On executing the per-revision bisect script, below is the changelog URL.

Changelog URL:
---------------
https://chromium.googlesource.com/chromium/src/+log/42df3b6bc4232566d3ee4d28371682f3b2326a72..563e8dd782f2c6ba461bde1d15591063d6a9ee62

From the above Changelog URL, suspecting the below change for this issue.
Reviewed-on: https://codereview.chromium.org/2415613003

xiaochengh@ Can you please check if this issue is related to your change, else help us in assigning to the right owner.


Thanks...
Blocking: 698661
Components: -Blink>Layout Blink>Editing
Labels: -Pri-1 -Type-Bug-Regression Performance-Responsiveness Pri-3 Type-Bug
Summary: DeleteSelectionCommand::RemoveNode() updates layout for every removed node (was: Deletion or overtyping in a paragraph with multiple spans is very slow)
Culprit: DeleteSelectionCommand::RemoveNode() performs a layout update for every general node removal:

https://chromium.googlesource.com/chromium/src/+/5f4ce8d92827e65b4049af367de043f1f6b02c3d/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp#523

Although the layout update is added by my CL, this shouldn't be considered as a performance regression because calculation of VisiblePosition requires clean layout, and the CL ensures correct behavior.

Lowered to P3 as it's an editing performance bug.
Owner: ----
Status: Available (was: Assigned)
I'm assigned with something else, and there's no easy fix.

Marking as available so that anyone may contribute :)
Project Member

Comment 4 by sheriffbot@chromium.org, Jan 10

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment