Bug 115601 - WebProcess consuming very high CPU on linkedin.com
Summary: WebProcess consuming very high CPU on linkedin.com
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh OS X 10.8
: P2 Normal
Assignee: zalan
URL: http://www.linkedin.com
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-05-04 15:29 PDT by Luc Jallois
Modified: 2013-05-13 01:53 PDT (History)
15 users (show)

See Also:


Attachments
Patch (7.38 KB, patch)
2013-05-10 03:30 PDT, zalan
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-06 for mac-mountainlion (515.60 KB, application/zip)
2013-05-10 05:36 PDT, Build Bot
no flags Details
Patch (7.96 KB, patch)
2013-05-10 16:13 PDT, zalan
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-04 for mac-mountainlion (531.22 KB, application/zip)
2013-05-10 18:47 PDT, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-08 for mac-mountainlion (530.25 KB, application/zip)
2013-05-10 19:49 PDT, Build Bot
no flags Details
Patch (37.50 KB, patch)
2013-05-11 06:36 PDT, zalan
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-06 for mac-mountainlion (526.97 KB, application/zip)
2013-05-11 14:15 PDT, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-01 for mac-mountainlion (534.29 KB, application/zip)
2013-05-11 15:23 PDT, Build Bot
no flags Details
Patch (38.91 KB, patch)
2013-05-12 08:52 PDT, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Luc Jallois 2013-05-04 15:29:50 PDT
Whenever I'm opening www.linkedin.com the "SafariForWebKitDevelopment Web Content" process is consuming very high CPU (between 50 and 100%).
Comment 1 Alexey Proskuryakov 2013-05-08 22:30:42 PDT
I think that this is the same as <rdar://problem/13794359> (Apple internal link). Zalan?
Comment 2 zalan 2013-05-08 23:40:41 PDT
(In reply to comment #1)
> I think that this is the same as <rdar://problem/13794359> (Apple internal link). Zalan?

Yes it is the same (just checked, that soon after finishing the page load, setTimeout(f(), 300) hits and creates clones. Within seconds, we've got over 100K objects with the same setTimeout(300)-creating-clones pattern -> high CPU usage.)
Comment 3 zalan 2013-05-10 03:30:03 PDT
Created attachment 201328 [details]
Patch
Comment 4 Build Bot 2013-05-10 03:46:15 PDT
Comment on attachment 201328 [details]
Patch

Attachment 201328 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/317088
Comment 5 zalan 2013-05-10 04:00:39 PDT
The build system does not see that JSDOMWindow.h/.cpp needs updating. 
DOMWindow.idl has the corresponding functions behind flags, but not the generated code in JSDOMWindow.h/.cpp
Any thoughts on how to fix this other than deleting JSDOMWindow* in DervidedSoruces?
Comment 6 Build Bot 2013-05-10 05:36:06 PDT
Comment on attachment 201328 [details]
Patch

Attachment 201328 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/458065

New failing tests:
fast/js/global-constructors-attributes.html
Comment 7 Build Bot 2013-05-10 05:36:09 PDT
Created attachment 201337 [details]
Archive of layout-test-results from webkit-ews-06 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-06  Port: mac-mountainlion  Platform: Mac OS X 10.8.2
Comment 8 Ryosuke Niwa 2013-05-10 08:37:21 PDT
Comment on attachment 201328 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=201328&action=review

> Source/JavaScriptCore/ChangeLog:10
> +        Turn off window.performance and performance.now(). Some JS frameworks expect
> +        additional Web Timing APIs, when performance.now() is available.

That's unfortunate. Can we add some internals method to give access to performance.now()?
performance tests ran by run-perf-tests uses performance.now() and going back to Date.now() is going to make the tests less reliable.
Comment 9 zalan 2013-05-10 09:38:35 PDT
(In reply to comment #8)
> (From update of attachment 201328 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=201328&action=review
> 
> > Source/JavaScriptCore/ChangeLog:10
> > +        Turn off window.performance and performance.now(). Some JS frameworks expect
> > +        additional Web Timing APIs, when performance.now() is available.
> 
> That's unfortunate. Can we add some internals method to give access to performance.now()?
> performance tests ran by run-perf-tests uses performance.now() and going back to Date.now() is going to make the tests less reliable.
we could easily mimic performance.now() in internals as it simply returns a monotonic time (since navigation start)
Comment 10 zalan 2013-05-10 16:13:06 PDT
Created attachment 201436 [details]
Patch
Comment 11 Build Bot 2013-05-10 18:47:46 PDT
Comment on attachment 201436 [details]
Patch

Attachment 201436 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/405169

New failing tests:
fast/js/global-constructors-attributes.html
Comment 12 Build Bot 2013-05-10 18:47:49 PDT
Created attachment 201445 [details]
Archive of layout-test-results from webkit-ews-04 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-04  Port: mac-mountainlion  Platform: Mac OS X 10.8.2
Comment 13 Build Bot 2013-05-10 19:49:06 PDT
Comment on attachment 201436 [details]
Patch

Attachment 201436 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/277251

New failing tests:
fast/js/global-constructors-attributes.html
Comment 14 Build Bot 2013-05-10 19:49:11 PDT
Created attachment 201446 [details]
Archive of layout-test-results from webkit-ews-08 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-08  Port: mac-mountainlion  Platform: Mac OS X 10.8.2
Comment 15 Benjamin Poulain 2013-05-10 23:44:18 PDT
Comment on attachment 201436 [details]
Patch

I think we should just remove ENABLE_WEB_TIMING_MINIMAL. It was a nice workaround but it will always break some feature detection code.
Comment 16 zalan 2013-05-11 00:05:42 PDT
(In reply to comment #15)
> (From update of attachment 201436 [details])
> I think we should just remove ENABLE_WEB_TIMING_MINIMAL. It was a nice workaround but it will always break some feature detection code.

With the exception of the Memory API. It is behind WEB_TIMING, but not necessarily something we want to expose for obvious reasons. I agree, though, that missing parts of PerformanceNavigation and PerformanceTiming have the potential of breaking detection code at any point of time. (even though performance.now() ought to just work as a standalone api, really as a monotonic timer. )
I am inclined to remove this completely and opt out of Memory when we enable WEB_TIMING.
Comment 17 zalan 2013-05-11 06:36:42 PDT
Created attachment 201455 [details]
Patch
Comment 18 Build Bot 2013-05-11 14:15:48 PDT
Comment on attachment 201455 [details]
Patch

Attachment 201455 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/346221

New failing tests:
fast/js/global-constructors-attributes.html
Comment 19 Build Bot 2013-05-11 14:15:51 PDT
Created attachment 201472 [details]
Archive of layout-test-results from webkit-ews-06 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-06  Port: mac-mountainlion  Platform: Mac OS X 10.8.2
Comment 20 Andreas Kling 2013-05-11 14:19:55 PDT
Comment on attachment 201455 [details]
Patch

r=me with failures not failing.
Comment 21 Build Bot 2013-05-11 15:23:09 PDT
Comment on attachment 201455 [details]
Patch

Attachment 201455 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/461207

New failing tests:
fast/js/global-constructors-attributes.html
Comment 22 Build Bot 2013-05-11 15:23:14 PDT
Created attachment 201473 [details]
Archive of layout-test-results from webkit-ews-01 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-01  Port: mac-mountainlion  Platform: Mac OS X 10.8.2
Comment 23 zalan 2013-05-12 08:52:07 PDT
Created attachment 201488 [details]
Patch
Comment 24 zalan 2013-05-13 01:25:44 PDT
Comment on attachment 201488 [details]
Patch

passed mac-ews
Comment 25 WebKit Commit Bot 2013-05-13 01:53:09 PDT
Comment on attachment 201488 [details]
Patch

Clearing flags on attachment: 201488

Committed r149999: <http://trac.webkit.org/changeset/149999>
Comment 26 WebKit Commit Bot 2013-05-13 01:53:14 PDT
All reviewed patches have been landed.  Closing bug.