Web Inspector: CPU Profile: Search in "heavy" mode is very slow.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Dec 2012 08:54:51 +0000 (08:54 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Dec 2012 08:54:51 +0000 (08:54 +0000)
commit0988489115e08c63fe922bf01c46c9f1cd7122de
tree5fd3aa93c63d4d53970a2919e708ed360c9c6740
parent7b899c38b500595c987643284ecf26bc603f9b58
Web Inspector: CPU Profile: Search in "heavy" mode is very slow.
https://bugs.webkit.org/show_bug.cgi?id=103682

Patch by Eugene Klyuchnikov <eustas@chromium.org> on 2012-12-14
Reviewed by Pavel Feldman.

In "heavy" mode the searchable tree is much larger than original tree.
That is why search can cause watchdog timer fired.

Simple optimization makes search much faster.

* inspector/front-end/CPUProfileView.js:
(WebInspector.CPUProfileView.prototype.searchCanceled):
Fix cleanup.
(WebInspector.CPUProfileView.prototype.matchesQuery):
Precompute regexp.
(WebInspector.CPUProfileView.prototype.performSearch):
Use precomputed regexp instead of generating one on each iteration.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@137729 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/CPUProfileView.js