Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 24233 - Adobe Acrobat sucks CPU time while in Mozilla
Summary: Adobe Acrobat sucks CPU time while in Mozilla
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Highest normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords: Inclusion
: 39689 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-07-10 08:49 UTC by David Grant
Modified: 2004-05-13 08:40 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to fix this bug. (mozilla-1.6_beta.ebuild.patch,542 bytes, text/plain)
2004-01-06 15:51 UTC, David Grant
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Grant 2003-07-10 08:49:31 UTC
When the acrobat reader is running as a plugin in Mozilla is makes the "X"
process use >80% CPU time.  I have only noticed this in Gentoo.  I used Debian
in the past and never had this problem.  Either it is a new version of Adobe
Acrobat that is doing this, or it could be an ebuild problem.
Comment 1 David Grant 2003-07-10 08:49:59 UTC
This only happens with the plugin, not running acrobat separately.
Comment 2 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-08-12 10:41:02 UTC
I cannot quite reproduce the problem (it doesn't consume CPU time
so much).  Please post output of "emerge info", "emerge -pv mozilla" 
and "emerge -pv acroread".  Does upgrading mozilla (or mozilla-firebird)
or/and acroread solve the problem?
Comment 3 David Grant 2003-08-12 11:09:26 UTC
Before opening a PDF in mozilla:

 PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  Command
 3665 root      15   0  300m  43m 2756 S  3.2  8.7 152:28.84 X
18964 david     16   0   996  996  780 R  2.3  0.2   0:00.23 top
 3853 david     15   0 19760  19m  15m S  1.3  3.8  90:17.44 kdeinit

After opening a PDF in mozilla:

 PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  Command
 3665 root      25   0  302m  45m 2756 R 71.9  9.1 152:10.09 X
19221 david     16   0 84052  81m  30m S 21.9 16.1   8:09.63 mozilla-bin
18963 david     16   0   996  996  780 R  2.3  0.2   0:00.22 top
 3853 david     15   0 19760  19m  15m S  1.6  3.8  90:16.68 kdeinit

root@sidicpc22 david # emerge info
Portage 2.0.48-r5 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1)
=================================================================
System uname: 2.4.20-gentoo-r5-fb i686 AMD Athlon(tm) Processor
GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY="/usr/local/portage"
USE="x86 oss 3dnow apm avi crypt cups encode foomaticdb gif jpeg libg++ mad mmx mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib directfb alsa gdbm berkdb slang readline arts tetex aalib nas svga tcltk java mysql postgres X sdl gpm tcpd pam libwww ssl perl python imlib oggvorbis qt kde motif opengl mozilla cdr artswrappersuid atlas curl emacs fbcon gd gtk2 guile joystick mcal mozcalendar mozp3p mozsvg mpi offensive pda pic plotutils ppds samba tiff type1 usb v4l wxwindows xvid -mikmod -esd -gnome -gtk"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=athlon-tbird -O3 -pipe -fomit-frame-pointer"
CXXFLAGS="-march=athlon-tbird -O3 -pipe -fomit-frame-pointer"
ACCEPT_KEYWORDS="x86"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
FEATURES="sandbox ccache"

root@sidicpc22 david # emerge -vp mozilla

[ebuild   R  ] net-www/mozilla-1.4-r3  +java +crypt -ipv6 +gtk2 +ssl -ldap -gnome -debug +mozsvg +mozcalendar -mozaccess +mozp3p -mozxmlterm -moznoirc -moznomail -moznocompose -moznoxft

root@sidicpc22 david # emerge -vp acroread

[ebuild   R  ] app-text/acroread-5.07

Comment 4 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-08-13 00:55:46 UTC
Hum, optimize flag may cause the problem, so please remove
"-march=athlon-tbird" from CFLAGS and CXXFLAGS, re-emerge
mozilla (you might need to re-emerge X as well) and try again?

Debian doesn't optimize their packages to specific architecture
(they usually only set "-O" and no -march nor -mcpu flag), they
may not encounter the problem.
Comment 5 David Grant 2003-08-16 14:23:06 UTC
I haven't tried fixing it yet, although I think your advice may be right.

Is it possible that we can force certain flags to not be used in this ebuild if they do in fact cause this problem?

I'll let you know if I get around to re-building acroread.
Comment 6 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-08-16 16:25:53 UTC
Yes, we can disable certain flags using strip-flags, filter-flags,
replace-flags and so on from flag-o-matic.eclass.  You may want to have a
look at flag-o-matic man page or /usr/portage/eclass/flag-o-matic.eclass
directly.

If you look into mozilla ebuild you will see most of your CFLAGS/CXXFLAGS
are removed or replaced.  If some of your CFLAGS/CXXFLAGS turn out to cause
this problem we can add them to the list of flags to be removed and
disable them.
Comment 7 Carsten Lohrke (RETIRED) gentoo-dev 2003-08-17 05:30:58 UTC
I can confirm this problem. Additional after closing the tab that includes the acrobat reader window, the subprocess won't be killed.
Comment 8 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-08-17 06:03:24 UTC
Carlo, can you post your "emerge info" please?
Comment 9 Carsten Lohrke (RETIRED) gentoo-dev 2003-08-17 07:55:17 UTC
Sure. 

Portage 2.0.48-r5 (default-x86-1.4, gcc-3.2.3, glibc-2.2.5-r2,2.3.2-r1)
=================================================================
System uname: 2.4.20-gentoo-r6 i686 AMD Duron(tm) Processor
GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://ftp.berlios.de/pub/gentoo-deutsch http://www.ibiblio.org/pub/Linux/distributions/gentoo"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /var/bind /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY="/usr/local/portage"
USE="x86 oss 3dnow apm avi crypt cups encode foomaticdb gif jpeg gnome libg++ mad mikmod mmx mpeg ncurses nls pdflib png spell truetype xml2 xmms xv zlib directfb gtkhtml alsa gdbm berkdb slang readline arts tetex aalib nas bonobo svga ggi tcltk java ruby mysql postgres X sdl gpm tcpd pam libwww ssl perl python imlib oggvorbis gtk qt kde motif opengl mozilla gphoto2 ldap snmp cdr scanner acl acpi acpi4linux artswrappersuid curl dga dnd doc dvd emacs faad fbcon firebird gd gtk2 hbci imap innodb jack jack-tmpfs jikes junit ladcca lcms libgda lirc maildir mbox mng moznocompose moznoirc moznomail mozsvg mozxmlterm oav openal plotutils pnp samba sasl slp sse tiff usb vim-with-x wmf xml xvid zeo -quicktime -guile -esd"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-O3 -march=athlon-xp -pipe -foptimize-sibling-calls -fomit-frame-pointer -funroll-loops -fforce-addr -msse -mmmx -m3dnow "
CXXFLAGS="-O2 -mcpu=i686 -pipe"
ACCEPT_KEYWORDS="x86"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
FEATURES="sandbox ccache keeptemp keepwork"
Comment 10 Carsten Lohrke (RETIRED) gentoo-dev 2003-08-17 08:35:27 UTC
Have a look at http://forums.gentoo.org/viewtopic.php?p=470249#470249. I think, it may be the same problem. I never had a version of Mozilla installed that was 100% stable, btw..
Comment 11 David Grant 2003-10-10 09:11:03 UTC
Ok, I re-emerged mozilla using CFLAGS="" and I'm still getting 80%+ CPU usage
by the X process.  Next, I'll try re-emerging X using CFLAGS="" and see if
that fixes it.
Comment 12 David Grant 2003-10-11 13:34:47 UTC
I have re-emerged X and Mozilla now with CFLAGS="" and I'm still getting
this 80%+ CPU usage by the "X" process.

Any advice would be greatly appeciated.
Comment 13 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-10-11 14:05:00 UTC
Thanks for testing hard. I really appreciate your effort.I have no idea about
the problem but I'm going to have access toDuron box next week, so I will
give it a try.
Comment 14 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-10-22 13:22:00 UTC
I'm sorry to say that I didn't succeed to reproduce the problem. I
attach `emerge info` at the Duron box I tested. I pretty appreciate
all of your help and assistance. If new info will be available,
please reopen the bug.


ginger% emerge -pv acroread

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] app-text/acroread-5.08  +cjk 

ginger% emerge -pv mozilla

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] net-www/mozilla-1.4-r3  +java +crypt -ipv6 -gtk2 +ssl -ldap
+gnome
-debug -mozsvg -mozcalendar -mozaccess -mozp3p -mozxmlterm -moznoirc -moznomail
-moznocompose -moznoxft 

ginger% emerge -pv xfree

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] x11-base/xfree-4.3.0-r3  -3dfx -sse -mmx -3dnow +xml2
+truetype +nls +cjk -doc -ipv6 -debug -static +pam -sdk -gatos 

ginger% emerge info
Portage 2.0.49-r13 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1,
2.4.21)
=================================================================
System uname: 2.4.21 i686 AMD Duron(tm) Processor
Gentoo Base System version 1.4.3.10p1
distcc 2.9 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632)
[disabled]
ccache version 2.3 [enabled]
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-mcpu=athlon -march=i586 -O -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share
/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/xdvi/ /usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-mcpu=athlon -march=i586 -O -pipe"
DISTDIR="/home/distfiles"
FEATURES="sandbox ccache autoaddcvs digest buildpkg"
GENTOO_MIRRORS="ftp://ftp.ecc.u-tokyo.ac.jp/GENTOO http://mh.sodan.ecc.u-tokyo.ac.jp/pub/linux/gentoo
http://ftp.gentoo.or.kr/ http://gentoo.gnukorea.org/ http://www.zentek-international.com/mirrors/gentoo/
http://www.zentek-international.com/mirrors/gentoo/ http://212.219.56.146/sites/www.ibiblio.org/gentoo/
http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/home/packages/i586"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/home/gentoo-x86"
SYNC="rsync://sb.itc.u-tokyo.ac.jp/gentoo-portage"
USE="x86 oss apm avi crypt cups encode foomaticdb gif jpeg libg++ mad mikmod
mpeg
ncurses pdflib png quicktime spell xml2 xmms xv zlib gdbm berkdb slang readline
arts aalib bonobo svga tcltk java guile ruby sdl gpm tcpd pam libwww perl
python
esd oggvorbis qt kde motif opengl cdr X gtk gnome cjk nls imlib ssl canna
emacs
freewnn mozilla truetype linguas_ja"


Comment 15 David Grant 2003-11-05 09:25:20 UTC
I just tried Opera today, and acroread has 0% CPU usage when a PDF file is
open inside Opera.  So it is definitely not an acroread problem...  Also,
do you think this can be narrowed down to a mozilla problem, as opposed to
an X problem?

This is my CFLAGS:

CFLAGS="-march=athlon-tbird -O3 -pipe -fomit-frame-pointer"

when I tried to emerge with no optimizations, I just did:

CFLAGS="" emerge mozilla xfree

Is this correct?  Did the optimizations actually get removed?  I'm not sure
how to change flags the fancy way, using flag-o-matic.  It seems that these
require me to edit the ebuild, but that seems like a less robust way than
say, changing make.conf, since it will get stomped on when I do emerge sync
right?

I also noticed that your flags were:

CFLAGS="-mcpu=athlon -march=i586 -O -pipe"

I didn't use the -mcpu option, should I?  I also used the march=athlon-tbird
option.  Is this bad?  Should I ust i586, i686, or just athlon instead? 
Comment 16 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-11-05 09:48:20 UTC
Right. If you want to make sure you get the desired CFLAGS/CXXFLAGS,you can
have a look at /var/db/pkg/[category]/[pkgname]/CFLAGS (and CXXFLAGS). As
for flag-o-matic, you need to modify the ebuild to employ CFLAGS sanitisation,
so using enviroment variable as you did is the easiest way to configure CFLAGS/CXXFLAGS.
I don't want to use too strong -march CFLAGS because it will create "illegal
instruction" error (I use created tbz2 files on different machines) but on
the other hand I want to have a benefit of CPU optimisation (that's why I
add -mcpu=athlon flag though -march=i586 automatically adds -mcpu=i586).
-mcpu does optimise binaries but the binaries will run on other machines.
If Opera works fine with Acrobat Reader, can you try net-www/mozilla-firebird-bin?
It is a pre-built binary so that your CFLAGS won't affect it.
Comment 17 David Grant 2003-11-05 09:59:58 UTC
I already had mozilla-firebird-bin installed (ver 6.1) and it worked fine.
 acroread was at 0% and X was at 6% (normal level).  I guess this is to be
expected, I used binaries in Debian (from Debian unstable as well as from
mozilla.org) and I never had this problem.

I'll keep working at it.  One thing to try is to compile firebird and work
with that instead of mozilla.  That will allow me to continue to use mozilla
today with no monkeying around, while I compile and test mozilla-firebird
in the background.
Comment 18 David Grant 2003-11-05 13:31:12 UTC
It is happening in mozilla-firebird, compiled today by me using:

CFLAGS="-march=athlon-tbird -O3 -pipe -fomit-frame-pointer"

which is what has always been in /etc/make.conf file

I will do some more testing now, by re-compiling.
Comment 19 David Grant 2003-11-05 19:35:08 UTC
I edited my make.conf file directly, to change CFLAGS, this was the simplest
way for me without messing around too much.  I first removed the arch flag
completely, then I removed O3, each with no success.  Now my CFLAGS according
to /var/db/pkg/net-www/mozilla-firebird/CFLAGS is the following:

-pipe -Wno-return-type -w -Wno-return-type -w -Wno-return-type -w -s -fforce-addr

It looks like -fforce-addr is the only optimization left in there!  That
is added by the mozilla-firebird ebuild for whatever reason, along with -s
(which is harmless).  However configure is using --enable-optimize=-O2 and
from looking at the output while compiling, it looks like -O2 is being used.
 I'll try removing this manually in the ebuild, then recompiling, and see
what happens.
Comment 20 Martin Schlemmer (RETIRED) gentoo-dev 2003-11-06 13:56:22 UTC
Do anybody know what gcc mozilla.org/adobe uses to compile their binary packages?
 It may just be another ABI issue ... ?
Comment 21 David Grant 2003-11-06 13:59:46 UTC
From http://www.mozilla.org/releases/mozilla1.4/README.html#new-issues

"The Linux binaries distributed by mozilla.org are now compiled with GCC
3.2"

Not sure of the subversion.  I have a question.  What does ABI issue mean?
 reply by email if you like.
Comment 22 Carsten Lohrke (RETIRED) gentoo-dev 2003-11-06 15:25:38 UTC
It must be terrible code, that they were not able to fix these three problems
from 1.4 to 1.5:
- netstat zombie process 
- acrobat sucking cpu time
- loosing focus
instead they're trying to improve these included email/composer components...
:(
Comment 23 David Grant 2003-11-06 15:34:34 UTC
I see some bugs on Mozilla.org about this.  I think it might be a gtk issue...
 I'm compiling with USE="-gtk2" right now.  I don't know why I never thought
of checking mozilla's bugzilla before!  I guess I assumed if mozilla.org's
binaries worked then it must not be a mozilla.org problem.  silly me...
Comment 24 Todd Geders 2003-11-06 18:47:21 UTC
I can confirm I have this problem too...it struck me as odd, because I just
reinstalled my beautifully stable Gentoo 1.2 installation to put on Gentoo
1.4, and this problem jumped out straight away.  

Emerge info out put:

Portage 2.0.49-r15 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1, 2.4.20-gentoo-r7)
=================================================================
System uname: 2.4.20-gentoo-r7 i686 Intel(R) Pentium(R) III Mobile CPU  
   1000MHz
Gentoo Base System version 1.4.3.10p1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=pentium3 -fprefetch-loop-arrays -funroll-loops -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config
/usr/kde/3/share/config /usr/X11R6/lib/X11/xkb:/usr/kde/3.1/share/config:/usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O3 -march=pentium3 -fprefetch-loop-arrays -funroll-loops -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="sandbox ccache autoaddcvs"
GENTOO_MIRRORS="http://csociety-ftp.ecn.purdue.edu/pub/gentoo/ ftp://csociety-ftp.ecn.purdue.edu/pub/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 oss apm avi crypt cups encode foomaticdb gif jpeg gnome libg++ libwww
mad mikmod mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms
xv zlib gdbm berkdb slang readline arts bonobo svga java ruby mysql postgres
X sdl gpm tcpd pam python imlib oggvorbis gtk qt kde motif opengl aalib acl
alsa cdr directfb dvd esd ethereal evo fbcon gb gd ggi gstreamer gtk2 gtkhtml
imap lcms ldap mozilla perl plotutils samba scanner slp ssl tcltk tiff usb
wmf Xaw3d xinerama xosd xml"
Comment 25 David Grant 2003-11-06 20:18:53 UTC
I think I've solved the bug.  It just had to do with the gtk2 USE flag. 
Get rid of that and the problem goes away.  I think that Gentoo should force
the gtk2 crap to NOT be used in their distribution until the problem is fixed
upstream.
Comment 26 David Grant 2003-11-06 21:03:06 UTC
mozilla also seems a bit snappier now without gtk2.  esp. startup seemed
faster
Comment 27 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-11-06 21:23:06 UTC
What a great job! Thanks for tracking down the problem. I can
reproduce the same problem on my machine. It occurs when I use mozilla
based brouwsers (I tried mozilla, epiphany, and kazehakase) built with
GTK+2 and CPU usage of X sticks to 65%. I don't have the problem with
mozilla and firebird built with GTK+1. This is a bug for sure, but there
are a number of people who want mozilla with GTK+2, so warning about
this bug in pkg_postinst of mozilla (and other GTK+2 mozilla embedded
browsers) might be good enough for it? (cf. GNOME 2.4 requires epiphany
and epiphany depends on GTK+2 enabled mozilla)
Comment 28 David Grant 2003-11-06 21:54:52 UTC
Ok, I'm fine with putting it in postinst.  But we could put it in pkg_preinst
to save people the compile time.  Actually pkg_preinst will run after compile
before before install, so maybe we can put a little einfo message in src_unpack?

BTW, I have noticed that I lost anti-aliasing in mozilla menus and toolbars
and tab headings.  It's not that bad though.  But I still have in in web
pages, thanks to mozilla xft I guess.
Comment 29 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-11-06 22:09:06 UTC
Good point. We could use pkg_setup for that purpose.(Personally I don't compile
mozilla with gtk2 so I haven't comeacross this problem)
Comment 30 David Grant 2003-11-07 03:12:27 UTC
Man, mozilla is MUCH snappier now.  I'm so much happier now.  Ooo, that rhymes.
 I use mozilla more than any other program I think.  Actually this is a funny
story, this is the reason I switched over to Gentoo from Debian...  I found
that the Debian binaries ran much slower than the binaries from moz.org.
 It was twice as slow to start up, and marking a pile of messages as Junk
took twice as long.  I filed a bug about this to the debian mozilla guy,
I think it's Tatuo-somthing, and the problem was never solved.  I compiled
my own Mozilla a few times from CVS but that was a pain, so I switched to
Gentoo so that a machine could automate the compiling for me.  Then I got
hooked on it.  But now I realize, it must have been because Debian's package
was compiled with gtk2 support.  What a relief this is solved....  The slowness
went way beyond acrobat problems...  
Comment 31 Martin Schlemmer (RETIRED) gentoo-dev 2003-11-07 09:58:28 UTC
Then you want the message rather in pkg_setup() if you want it before its
even unpacking stuff ....
Comment 32 David Grant 2003-11-07 21:26:50 UTC
First cut at it:

in pkg_setup() or in moz_setup() (called by src_unpack)

if [ -n "`use gtk2`"]
then
einfo "You have the gtk2 flag enabled.  This can cause a slowdown in Mozilla's
performance especially when using the acroread plugin to view a PDF file.
 Consider disabling this flag unless you know that you require it."
fi

please revise as you see fit
Comment 33 David Grant 2003-11-25 13:33:52 UTC
Mozilla 1.5 just came out recently.  I'd like to see something added to the mozilla ebuild about this USE="gtk2" issue.  Actually, this is a bug in gtk2, so I think it is a serious issue and we need a workaround, if not a serious warning to the user in the form of some einfo statements.
Comment 34 David Grant 2004-01-06 15:51:19 UTC
Created attachment 23267 [details]
Patch to fix this bug.

Please commit this
Comment 35 Heitzso 2004-01-27 09:06:22 UTC
While the PDF viewer consistently triggers the CPU suck problem, 
it goes beyond PDF viewing.

I just had epiphany (current stable) with two windows, 
one window being gentoo.org, the other window linuxtoday.com, 
and cpu usage was pegged.  I had had epiphany up just a few minutes.  

I was trying Epiphany to see if that worked better than Mozilla,
so problem is in the underlying common library.

Email me if you want my USE flags, etc. and I'll post them.  
By box is AMD 2200 XP UP, 1.5G RAM.  

This is frustrating.  
I find myself killing and restarting mozilla several times a day, 
and when cpu usage is pegged just killing mozilla can take a minute.

I also find myself running 'emerge sync emerge -u sys/wor' seq often
hoping that something in gentoo will straighten this out soon.  
But that thrashes both your servers and my box and so far hasn't fixed Mozilla.

What's the current recommended work around?  Re-emerging with gtk2 off?
Is there a fix upstream that will percolate down to stable soon?

Thanks
Comment 36 David Grant 2004-01-27 09:48:07 UTC
re-emergeing with gtk2 flag off is the only solution.  But I heard that epiphany has to be gtk2, and gnome 2.4 requires epiphany.  Is that right?

I'm not sure if it's a mozilla problem or a gtk problem.  I knew this before but I forgot, and I can't find anything on google about it right now.
Comment 37 STefan 2004-01-27 11:38:46 UTC
Same problem, same solution, if gtk2 is off acrobat works as expected.
Comment 38 Mamoru KOMACHI (RETIRED) gentoo-dev 2004-01-28 15:47:26 UTC
*** Bug 39689 has been marked as a duplicate of this bug. ***
Comment 39 Jaco Kroon 2004-02-07 02:16:01 UTC
Why not just change

    ( gtk2? >=x11-libs/gtk+-2.2.0 :
            =x11-libs/gtk+-1.2* )
    ( gtk2? >=dev-libs/glib-2.2.0 :
            =dev-libs/glib-1.2* )

to be just:
    =dev-libs/gtk+-1.2*
    =dev-libs/glib-1.2*

Comment 40 Jaco Kroon 2004-02-07 02:37:51 UTC
Ok, I just spoke with some people on #gentoo and it seems the warning route would be better as in the patch that is already attached.
Comment 41 David Grant 2004-02-07 09:00:26 UTC
I agree, so can someone commit this change please?  I don't know why there is a 1 month delay to get a simple patch in, with 2 @gentoo.org addresses on the CC list and one assignee (mozilla team).
Comment 42 Mamoru KOMACHI (RETIRED) gentoo-dev 2004-02-08 03:57:43 UTC
Mozilla ebuild has no maintainer and belongs to mozilla herd, so mozilla herd takes first precedence in changing the ebuild. If mozilla herd allows me to commit the change, I'll be glad to do that. azarah and brad, what do you guys think about this bug? 
Comment 43 Brad Laue (RETIRED) gentoo-dev 2004-02-08 07:26:19 UTC
http://bugzilla.mozilla.org/show_bug.cgi?id=198954

The GTK+2 port of mozilla is important for a few reasons, not the least of which:

GNOME now depends on Mozilla being built with GTK+2, as does galeon

GTK+2 has far more support for i18n and other standards that will make Linux on the desktop sucessful while GTK+1 will not

GTK+1 is deprecated and no longer developed, and will eventually create more bugs than it solves

A suggested workaround is to use 'plugger' to embed the adobe acrobat program until the issue is resolved upstream - but since it's just one plugin wouldn't it make more sense to place an advisory in the adobe acrobat ebuild? Telling people to build Mozilla against GTK+1 or it will eat their babies would cause a lot of confusion.
Comment 44 David Grant 2004-02-08 08:56:39 UTC
Telling someone in the Acrobat ebuild may cause someone to have to rebuild mozilla.  The wording of the patch can be changed:

--- mozilla-1.6_beta.ebuild	2003-12-20 13:37:49.000000000 -0500
+++ mozilla-1.6_beta.ebuild.mod	2004-01-06 18:49:13.000000000 -0500
@@ -97,6 +97,15 @@
 	dev-lang/perl
 	java? ( >=dev-java/java-config-0.2.0 )"
 
+pkg_setup() {
+	if [ -n "`use gtk2`" ]
+	then
+		einfo "You have the gtk2 flag enabled.  This can cause a slowdown"
+		einfo "in Mozilla's performance when using the acroread"
+		einfo "plugin to view a PDF file.  Consider disabling this flag"
+		einfo "if you use the the Adobe Acrobat plugin with Mozilla."
+	fi
+}
 
 moz_setup() {
 
Comment 45 Martin Mokrejš 2004-02-08 14:57:20 UTC
Hi,
  I used to have similar speed problems with acrobat plugin in mozila. The problem was DRI enabled in X windows. Disable the "Load "dri"" line in XF86Config-4 file, restart xdm and try again. It should go away. I use radeon from dri.sourceforge.net (aka xfree-drm) module.
Comment 46 David Grant 2004-02-08 15:38:11 UTC
This is isn't just a "speed" program.  I don't have dri enabled in my XFree86 config file, I use the nvidia module/driver.
Comment 47 David Grant 2004-02-13 10:51:48 UTC
No comments so far from azarah or brad.

This is needs to be implemented or another alternative found.  I used Gentoo for a LONG time with this problem and it is really critical IMO.
Comment 48 Mamoru KOMACHI (RETIRED) gentoo-dev 2004-02-13 11:18:32 UTC
Brad wrote his comment in Comment #43. I'm also inclined to add an advisory to acrobat reader's ebuild. David, are you ok with it? 
Comment 49 David Grant 2004-02-13 11:24:20 UTC
Yes, putting the warning with the plugin's ebuild makes more sense.  As long as it gets out there.
Comment 50 Mamoru KOMACHI (RETIRED) gentoo-dev 2004-02-15 10:04:50 UTC
Added an advisory to acroread-5.08.ebuild. Thanks.