Rene Engelhard a écrit :
tag 499062 + wontfix
retitle 499062 [fixed for 3.1, cws cmcfixes48] openoffice.org-common: "find
~/.mozilla/firefox -name cert8.db" in soffice is a killing OOo starting time
thanks
Hi,
Hello Rene,
Fabrice Lorrain wrote:
Tonight, I just saw the culprit in action (ps -faux) :
lorrain 10249 0.0 0.1 4084 1152 pts/1 S+ 22:14 0:00 \_
/bin/sh /usr/bin/ooimpress pouet.ppt
lorrain 10250 0.0 0.1 4628 1500 pts/1 S+ 22:14 0:00
\_ /bin/sh /usr/lib/openoffice/program/soffice -impress pouet.ppt
lorrain 10260 0.0 0.0 4628 740 pts/1 S+ 22:14 0:00
\_ /bin/sh /usr/lib/openoffice/program/soffice -impress pouet.ppt
lorrain 10261 6.0 0.1 4492 1744 pts/1 R+ 22:14 0:00
\_ find /home/lorrain/Fab_sid/.mozilla/firefox -name cert8.db
lorrain 10262 0.0 0.0 3512 692 pts/1 S+ 22:14 0:00
\_ head -n 1
The crude "find" above and :
I don't see what's crude in there, sorry.
It's "crude" in the meaning of doing a full find when in most case you
are looking for $dir/*/cert.db.
$ du -sh /home/lorrain/Fab_sid/.mozilla/firefox
4,8G /home/lorrain/Fab_sid/.mozilla/firefox
err, maybe you should clean it up a bit to a sane size?
I would friendly say "None of your business" :-p
I've been using scrapbook (http://amb.vis.ne.jp/mozilla/scrapbook/) for
quite some time know. And I started to transform 10 year of printed
documentations back to there numerical form with it. I expect to
increase the size of my ~/.mozilla.
I just did a quick check at work, and out of 900 firefox users, none use
more than 200Mo.... Downgrading this bugreport to a whishlist is fine
with me.
Fixing this problem for Lenny would be appreciated.
No way. Too much a change.
Hmmm, have a look at the crude patch provided. Doesn't seem invasive
from my viewpoint.
A quick fix, could be to check only the first level directory and if no
result where found refert to the full find.
Huh?
Have a look at the patch. Doing a find -maxdepth 2 first, revert to the
full search in case you didn't find a cert8.db file.
$ find .mozilla -name "cert8.db"
.mozilla/firefox/fpxsk24r.default/cert8.db
Because it's in that "random string" dir you have to use find..
...
Out of curiosity :
- What use has OOo with iceweasel cert8.db ?
It uses the certificates (using NSS) for XML signing.
- Why chose this one in particular (I have also a
.mozilla/flock/*/cert8.db) ?
It looks for one cert8.db. Whether that's right or not is not the business
of the snippet - I know it's too unflexible but we needed a solution to
make document signing work out of the box.
Hmmm, discovering the need for cert8.db with this BTS, I was wondering
if this file shouldn't be a user ressource provided in a central way
instead of through ice* packages. Maybe a post-lenny discussion for
devel@ or [EMAIL PROTECTED]
OOo 3.1 will have reworked code
(http://www.openoffice.org/issues/show_bug.cgi?id=92087),
though, which makes the snippet unnecessary.
Maybe I'll backport it for 3.0, but for 2.4.1 the train has long left.
You maintain the beast, the decision is yours.
Thanks.
@+,
Fab
--- soffice.ori 2008-09-06 07:23:30.000000000 +0200
+++ soffice.new 2008-09-23 19:15:53.000000000 +0200
@@ -305,7 +305,12 @@
fi;
done
if [ -n "$dir" ]; then
- cert8=`find $dir -name "cert8.db" | head -n 1`
+ # In most case cert8.db will be in $dir/*/cert8.db.
+ # Test this first. Do a full search otherwise (close BTS #499062).
+ cert8=`find $dir -maxdepth 2 -name "cert8.db" | head -n 1`
+ if [ ! -n "$cert8" ]; then
+ cert8=`find $dir -name "cert8.db" | head -n 1`
+ fi
if [ -n "$cert8" ]; then
profiledir=`dirname "$cert8"`
MOZILLA_CERTIFICATE_FOLDER=$profiledir