animated gif causes high (sometimes 100%) CPU usage

RESOLVED DUPLICATE of bug 86319

Status

()

Core
ImageLib
RESOLVED DUPLICATE of bug 86319
17 years ago
4 years ago

People

(Reporter: mike watson, Assigned: Stuart Parmenter)

Tracking

({perf})

Trunk
Future
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(2 attachments)

(Reporter)

Description

17 years ago
Page is using up 100% cpu. This may be a dupe but I couldnt see anything exactly
matching the description.

I suspect its an image rending problem as if you scroll to the bottom of the
page where there are less images the cpu usage drops.
(Reporter)

Comment 1

17 years ago
Sorry, this is in build 2001091403

Comment 2

17 years ago
With a 600MHz Athlon, I don't see 100% CPU usage, but it does hover around 40%,
which is quite high.  And Mozilla's response when I try to scroll is definitely
impaired.  More significant is that NS 4.x shows CPU usage around 7%, and there
is no slowdown in scrolling.

Comment 3

17 years ago
using 0.9.4 i dont have a problem on that page, BUT i have the same problem on
the w3 css page http://www.w3.org/Style/CSS/
No dupes found. Confirming and marking NEW. (For me, Mozilla used about 70% CPU
on an Athlon 728 MHz)
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 5

17 years ago
How strange.  I thought at first that the reported URL's problems might be from
all the images, too, but turning off the display of images doesn't make the CPU
usage drop very much.  Turning off Javascript didn't help, either.

Comment 6

17 years ago
If I change my default background colour to ie pink, I can see an area at the
top of the page changing colours from white to pink an back again repeatedly.
Keywords: perf
(Reporter)

Comment 7

17 years ago
Hmm, just duplicaed the flashing bar here (but not in IE or opera). 

What I have noticed though is that the page initially sticks up a loading screen
thats basically a tiled (possibly animated) image before displaying the main
menu.On IE it seems to overlay the menu on top and so obscuring it.

Is it possible that Moz is still refreshing this background?
Keywords: perf
(Reporter)

Comment 8

17 years ago
Sorry, just noticed bugzilla got rid of the keywords last time..
Keywords: perf

Comment 9

17 years ago
Looks like something funny with that background image. attaching testcases and
moving to imagelib.

I've narrowed it down to what I think is the most simplified testcase that still
reproduces a CPU spike (note, my cpu goes up to about 40%, back to 0% then up to
40% again, cycling like this when I view the full page and when I view the testcase)

<html>
<body BACKGROUND="http://www.7dayshop.com/acatalog/loading.gif">
</body>
</html>

The reason I think this is an image problem is that when I replace that gif with
mozilla-banner.gif I don't see the CPU spiking. 

Assignee: asa → pavlov
Component: Browser-General → ImageLib
QA Contact: doronr → tpreston

Comment 10

17 years ago
Created attachment 50259 [details]
body BACKGROUND="http://www.7dayshop.com/acatalog/loading.gif" which demonstrates a cycling CPU spike

Comment 11

17 years ago
Created attachment 50260 [details]
<body BACKGROUND="http://www.mozilla.org/images/mozilla-banner.gif"> which doesn't cause CPU spike

Comment 12

17 years ago
http://www.livingingreytown.com/comics/grey20010919.gif

Above image used 100% of CPU on an Athlon 1gighz, running win2k.
Reported by webart to have used 30% of his under Linux (who knows, might've had
a build goin on at the same time, or maybe Linux code marginally better written?
:) )

Build ID - 2001091303 - Fell back to official 0.9.4 release at the moment, I
think...

Comment 13

17 years ago
loading.gif is an animated gif file but for whatever reason it does not seem
animate in mozilla. Note that I don't see 100% CPU usage just about 30+% and
only when the page is visible. I have a feeling that this might have more to do
with the tiling of the image as when I load the image on its own the CPU usage
stays at 0%.

this was tested using build 2001091303 win32 on win2k

Updated

16 years ago
Blocks: 71668

Comment 14

16 years ago
This http://www.livingingreytown.com/comics/grey20010919.gif also happens to be
an animated gif.
Summary: 100% CPU usage on page → animated gif causes high (sometimes 100%) CPU usage

Comment 15

16 years ago
I still 100% CPU usage with win XP build on the original URL and 
http://www.livingingreytown.com/comics/grey20010919.gif 

Updated

16 years ago
Blocks: 119597
(Assignee)

Updated

16 years ago
Target Milestone: --- → Future

Comment 16

16 years ago
this might be a dup of bug 86319

Comment 17

16 years ago
http://www.livingingreytown.com/comics/grey20010919.gif is trying to animate a
733x238 frame every 0.01s.. that's 100 frames a second.  Even Animation Shop
uses 100% of my CPU when trying to animate the gif.

http://www.7dayshop.com/acatalog/loading.gif is File Not Found.. can't test.

Comment 18

16 years ago
Just built with the patch in bug 125137 (attachment 70577 [details]) on a P3/500 running
Linux, XFree86 4.1.0

Testing http://www.livingingreytown.com/comics/grey20010919.gif :

CPU usage before patch: X 47.0%, mozilla-bin 41.2% -> Total: 88,2%
CPU usage after patch:  X 11.1%, mozilla-bin 39.0% -> Total: 50,1%

Comment 19

16 years ago
Ooops.. that was the patch in attachment 70180 [details] [diff] [review] - (not 70577, which is a gif)

Updated

16 years ago
Keywords: mozilla1.0+

Updated

16 years ago
Keywords: mozilla1.0+

Comment 20

16 years ago
reopen if you think otherwise.

*** This bug has been marked as a duplicate of 86319 ***
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → DUPLICATE

Updated

16 years ago
No longer blocks: 119597
You need to log in before you can comment on or make changes to this bug.