RESOLVED FIXED 67198
Web Inspector: console view does a style recalculation per each addMessage call
https://bugs.webkit.org/show_bug.cgi?id=67198
Summary Web Inspector: console view does a style recalculation per each addMessage call
Ilya Tikhonovsky
Reported 2011-08-30 05:44:43 PDT
it is bad from the performance point of view.
Attachments
[patch] initial version (2.18 KB, patch)
2011-08-30 05:48 PDT, Ilya Tikhonovsky
yurys: review-
[patch] second iteration (2.36 KB, patch)
2011-08-30 08:20 PDT, Ilya Tikhonovsky
no flags
Ilya Tikhonovsky
Comment 1 2011-08-30 05:48:05 PDT
Created attachment 105620 [details] [patch] initial version
Vsevolod Vlasov
Comment 2 2011-08-30 05:55:31 PDT
Comment on attachment 105620 [details] [patch] initial version View in context: https://bugs.webkit.org/attachment.cgi?id=105620&action=review > Source/WebCore/inspector/front-end/ConsoleView.js:286 > + if (!this._isScrollIntoViewScheduled() && ((msg instanceof WebInspector.ConsoleCommandResult) || this.messagesElement.isScrolledToBottom())) this._scrollIntoViewTimer is already checked in _scheduleScrollIntoView(), isn't it?
Ilya Tikhonovsky
Comment 3 2011-08-30 06:00:25 PDT
Comment on attachment 105620 [details] [patch] initial version View in context: https://bugs.webkit.org/attachment.cgi?id=105620&action=review >> Source/WebCore/inspector/front-end/ConsoleView.js:286 >> + if (!this._isScrollIntoViewScheduled() && ((msg instanceof WebInspector.ConsoleCommandResult) || this.messagesElement.isScrolledToBottom())) > > this._scrollIntoViewTimer is already checked in _scheduleScrollIntoView(), isn't it? the problem is in this.messagesElement.isScrolledToBottom call. This call is forcing style recalculation. In the old code we do style recalculation even if we already scheduled the scroll action.
Yury Semikhatsky
Comment 4 2011-08-30 06:44:21 PDT
Comment on attachment 105620 [details] [patch] initial version View in context: https://bugs.webkit.org/attachment.cgi?id=105620&action=review >>> Source/WebCore/inspector/front-end/ConsoleView.js:286 >>> + if (!this._isScrollIntoViewScheduled() && ((msg instanceof WebInspector.ConsoleCommandResult) || this.messagesElement.isScrolledToBottom())) >> >> this._scrollIntoViewTimer is already checked in _scheduleScrollIntoView(), isn't it? > > the problem is in this.messagesElement.isScrolledToBottom call. This call is forcing style recalculation. > In the old code we do style recalculation even if we already scheduled the scroll action. isScrolledToBottom() should be called *before* the new message has been added.
Ilya Tikhonovsky
Comment 5 2011-08-30 08:20:00 PDT
Created attachment 105632 [details] [patch] second iteration
Ilya Tikhonovsky
Comment 6 2011-08-31 05:12:51 PDT
Comment on attachment 105632 [details] [patch] second iteration Clearing flags on attachment: 105632 Committed r94178: <http://trac.webkit.org/changeset/94178>
Ilya Tikhonovsky
Comment 7 2011-08-31 05:12:58 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.