WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
15059
Safari consumes 100% CPU when spinner is showing in tab bar
https://bugs.webkit.org/show_bug.cgi?id=15059
Summary
Safari consumes 100% CPU when spinner is showing in tab bar
Michael A. Puls II
Reported
2007-08-23 00:04:43 PDT
In WebKit-
r25168
, when an alert dialog is activated in a loop, the whole time the alert is shown, there's 100% cpu usage. Other browsers don't do this.
Attachments
Demo
(97 bytes, text/html)
2007-08-23 00:05 PDT
,
Michael A. Puls II
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Michael A. Puls II
Comment 1
2007-08-23 00:05:22 PDT
Created
attachment 16089
[details]
Demo
Alexey Proskuryakov
Comment 2
2007-08-23 00:49:58 PDT
I cannot reproduce this on a Mac, so it's probably Windows-only.
David Kilzer (:ddkilzer)
Comment 3
2007-08-23 03:46:28 PDT
Is this holding up page load as well? The network spinner spins the whole time the dialog is up when I loaded the demo.
Adam Roben (:aroben)
Comment 4
2007-08-23 09:35:58 PDT
When using Safari for Windows 3.0.3, I see 0% CPU usage from Safari.exe when the alert() dialog is up in the testcase.
Adam Roben (:aroben)
Comment 5
2007-08-23 09:37:52 PDT
And ditto when using the
r25168
nightly with Safari for Windows 3.0.3. Michael, are you sure it was Safari.exe that was using your CPU and not some other process?
Michael A. Puls II
Comment 6
2007-08-23 14:59:24 PDT
(In reply to
comment #5
)
> And ditto when using the
r25168
nightly with Safari for Windows 3.0.3. > > Michael, are you sure it was Safari.exe that was using your CPU and not some > other process? >
Thanks. Yes, 100% sure it's Safari.exe. Do you have a PII 350 or a PIII 500 around to test with? Perhaps your cpu is too fast for you to be able to notice. On these systems though, the other browsers don't do it. It's only Safari.
Adam Roben (:aroben)
Comment 7
2007-08-23 15:56:36 PDT
Perhaps the CPU usage is coming from the pulsing OK button? Could you see if, for example, the Add Bookmark sheet causes the same issue? (Press Ctrl+D to get the sheet to appear)
Michael A. Puls II
Comment 8
2007-08-23 17:01:56 PDT
(In reply to
comment #7
)
> Perhaps the CPU usage is coming from the pulsing OK button? Could you see if, > for example, the Add Bookmark sheet causes the same issue? (Press Ctrl+D to get > the sheet to appear) >
Just tried that and even tried just javascript:alert('test'); in the address field. However, those won't reproduce the problem, but I can tell that the flashing of the button uses a *tiny* bit of cpu. However, I just narrowed it down. page.html <script> alert(''); </script> What that does is leave Safari in the loading state and while in the loading state, waiting for the user to click O.K., Safari uses 100% cpu. Now, I tried window.onload = function() { alert('');}; instead to wait till after Safari was done loading the page so Safari wouldn't be left in the loading state, but Safari still was. So, this has nothing to do with a loop and a better description would be: when Safari's in the loading state and an alert() pauses loading, it causes Safari to use 100%.
David Kilzer (:ddkilzer)
Comment 9
2007-08-24 07:12:00 PDT
(In reply to
comment #8
)
> What that does is leave Safari in the loading state and while in the loading > state, waiting for the user to click O.K., Safari uses 100% cpu.
Is the network "spinning" going the whole time the alert sheet is up? Is there an easy way for users to run the equivalent of "sample" on Windows?
Michael A. Puls II
Comment 10
2007-08-24 18:40:40 PDT
(In reply to
comment #9
)
> (In reply to
comment #8
) > > What that does is leave Safari in the loading state and while in the loading > > state, waiting for the user to click O.K., Safari uses 100% cpu. > > Is the network "spinning" going the whole time the alert sheet is up?
Yes. That's the problem. (Feel free to adjust the summary to a better description.)
> Is there an easy way for users to run the equivalent of "sample" on Windows?
I'm not sure what you mean. Could you clarify?
David Kilzer (:ddkilzer)
Comment 11
2007-08-24 21:52:36 PDT
(In reply to
comment #10
)
> > Is there an easy way for users to run the equivalent of "sample" on Windows? > I'm not sure what you mean. Could you clarify?
On Mac OS X, there is a command-line program called /usr/bin/sample that will record methods being called and the call stack. This is useful for diagnosing hangs. I was wondering if there was an equivalent tool available for Windows.
Michael A. Puls II
Comment 12
2007-08-25 00:45:29 PDT
(In reply to
comment #11
)
> (In reply to
comment #10
) > > > Is there an easy way for users to run the equivalent of "sample" on Windows? > > I'm not sure what you mean. Could you clarify? > > On Mac OS X, there is a command-line program called /usr/bin/sample that will > record methods being called and the call stack. This is useful for diagnosing > hangs. I was wondering if there was an equivalent tool available for Windows. >
Thanks for clarifying. I'm not sure what to use for win32. But, I narrowed down the problem more. I don't get the problem if I hide the tab bar. So, it must be the spinning load indicator pic that's on the right edge of the tab. Is there a way I can extract the pic (assuming it's an animated gif of some kind) so that I can load it on a page to see if that's it? If you're convinced that's the problem though, mark this as invalid and I'll file a Safari bug at
https://bugreport.apple.com/
Adam Roben (:aroben)
Comment 13
2007-08-25 01:42:15 PDT
(In reply to
comment #12
)
> But, I narrowed down the problem more. I don't get the problem if I hide the > tab bar. So, it must be the spinning load indicator pic that's on the right > edge of the tab. > > Is there a way I can extract the pic (assuming it's an animated gif of some > kind) so that I can load it on a page to see if that's it? > > If you're convinced that's the problem though, mark this as invalid and I'll > file a Safari bug at
https://bugreport.apple.com/
At this point it does sound like it's a Safari bug, so it would be great to file a bug at bugreport.apple.com. When you do so, please note the radar number in here and we'll close this bug. Thanks for all the investigation!
Michael A. Puls II
Comment 14
2007-08-25 03:30:50 PDT
(In reply to
comment #13
)
> At this point it does sound like it's a Safari bug, so it would be great to > file a bug at bugreport.apple.com. When you do so, please note the radar number > in here and we'll close this bug. Thanks for all the investigation!
Safari Problem ID: 5437683
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug