After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 106598 - Epiphany consumes all the memory when importing galeon bookmarks
Epiphany consumes all the memory when importing galeon bookmarks
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Bookmarks
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Marco Pesenti Gritti
Marco Pesenti Gritti
: 111866 (view as bug list)
Depends on:
Blocks: 112094
 
 
Reported: 2003-02-20 11:24 UTC by mmagallo
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The python script. BTW, you need the libxml2 python stuff for this to work (535 bytes, text/plain)
2003-02-22 21:41 UTC, James Willcox
  Details
Requested file, bug still reproduceable (116.25 KB, text/xml)
2003-02-23 08:41 UTC, mmagallo
  Details
Fix for memory leak and cpu hogging of bookmark import (1.87 KB, patch)
2003-05-04 00:01 UTC, oa
none Details | Review
updated patch, with ChangeLog (2.38 KB, patch)
2003-05-05 20:24 UTC, oa
none Details | Review

Description mmagallo 2003-02-20 11:24:02 UTC
I have, according to grep -c '<bookmark' ~/.galeon/bookmarks.xbel, 808
bookmakrs in Galeon.  When importing them into Epiphany, it will start
chewing up all the available memory until the OOM killer kicks in.

$ epiphany --version
Gnome epiphany-browser 0.5.0

$ dpkg -s epiphany-browser | grep ^Version:
Version: 0.5.0+0.4.99.20030214-4

Thanks,

Marcelo
Comment 1 James Willcox 2003-02-22 21:40:50 UTC
For me to debug this, I think I'll need a copy of your bookmarks file.
 If you don't want to attach it with the real content in it, I'm
attaching a little python script to strip that stuff out.  Just save
it as 'strip.py' or something, and do './strip.py
~/.galeon/bookmarks.xbel'.  It will save the stripped version as
'stripped_bookmarks.xbel'.  Thanks a lot.
Comment 2 James Willcox 2003-02-22 21:41:49 UTC
Created attachment 14532 [details]
The python script.  BTW, you need the libxml2 python stuff for this to work
Comment 3 mmagallo 2003-02-23 08:41:58 UTC
Created attachment 14543 [details]
Requested file, bug still reproduceable
Comment 4 Marco Pesenti Gritti 2003-04-30 11:50:41 UTC
*** Bug 111866 has been marked as a duplicate of this bug. ***
Comment 5 oa 2003-05-03 21:57:53 UTC
The same problem applies to importing Mozilla bookmarks as well. 841
in my case, Epiphany makes the system run out of memory before it gets
through with the job.
Comment 6 oa 2003-05-04 00:00:28 UTC
The problem was a missing xmlFreeDoc() call in the end of
ephy_bookmarks_save(). Adding this makes the import memory usage
stable, but it still takes a very long time due to the bookmarks file
being rewritten after each imported bookmark. I'm attaching a diff
that changes this as well - bookmarks are saved only once after the
import is done, which makes the import fast enough to be virtually
instantaneous.
Comment 7 oa 2003-05-04 00:01:28 UTC
Created attachment 16241 [details] [review]
Fix for memory leak and cpu hogging of bookmark import
Comment 8 Marco Pesenti Gritti 2003-05-05 16:43:51 UTC
Rocking, you found the prob :)
We still need to save when adding single bookmarks though, need to
think to a sane way to do it, anyway you did the hard part, thanks !
Comment 9 oa 2003-05-05 19:42:36 UTC
That's taken care of by the patch already. The only place that I found
that called ephy_bookmarks_add() will call ephy_bookmarks_save()
immediately afterwards. The alternative would have been to add a
boolean save parameter and/or a second function, but this made for a
smaller patch.
Comment 10 Marco Pesenti Gritti 2003-05-05 19:51:53 UTC
Oh missed that bit. Yeah it sounds like a good solution.
I'll commit it (it would be good if you could add a ChangeLog). Or if
you have cvs access please commit it.
Comment 11 oa 2003-05-05 20:24:24 UTC
Created attachment 16278 [details] [review]
updated patch, with ChangeLog
Comment 12 oa 2003-05-05 20:24:57 UTC
I don't have CVS access..
Comment 13 Marco Pesenti Gritti 2003-05-05 22:37:33 UTC
Committed, thanks !