[Xfce-bugs] [XFCE 0000296]: big backdrop .list files cause xfce-mcs-manage to use way, way too much memory
xfce-bugs at xfce.org
xfce-bugs at xfce.org
Wed Sep 8 02:11:36 CEST 2004
The following bug has been ASSIGNED.
=======================================================================
http://bugs.xfce.org/view_bug_page.php?f_id=0000296
=======================================================================
Reporter: indigoid
Handler: kelnos
=======================================================================
Project: XFCE
Bug ID: 0000296
Category: general
Reproducibility: always
Severity: major
Priority: low
Status: assigned
=======================================================================
Date Submitted: 2004-08-15 18:59 UTC
Last Modified: 2004-09-08 00:11 UTC
=======================================================================
Summary: big backdrop .list files cause xfce-mcs-manage to use way, way too much memory
Description:
I made up (via find -name '*.jpg' >> foo.list) a .list file with about 3500
biggish images in it. Pressed the edit button. Waited. Disk activity
gets worse and worse. Out of memory. Oops, I won't try that again :-(
=======================================================================
-----------------------------------------------------------------------
dannym - 2004-08-15 19:13 UTC
-----------------------------------------------------------------------
ouch...
which xfce version is it ?
-----------------------------------------------------------------------
indigoid - 2004-08-15 19:27 UTC
-----------------------------------------------------------------------
4.0.5. Didn't see any previous reports for such a bug, though.
-----------------------------------------------------------------------
kelnos - 2004-08-19 17:57 UTC
-----------------------------------------------------------------------
i don't use an image list, so i haven't hit this. there are definitely
some performance issues with image list handling that i need to resolve,
but i'm not so sure that they'll be backported to the 4.0.x branch.
-----------------------------------------------------------------------
indigoid - 2004-08-20 15:55 UTC
-----------------------------------------------------------------------
Yep. I don't think that the aforementioned behaviour is a bug, as such,
but it sure does use way more memory than I expected it to. It seems to
work ok with much smaller lists.
-----------------------------------------------------------------------
kelnos - 2004-08-29 00:03 UTC
-----------------------------------------------------------------------
this works fine in CVS, using an image list file with >2500 images. memory
usage jumps about a bit while loading the list, but after it's finished,
usage is about the same as before it started. this is probably a
4.0.x-only bug, and i really don't have the time or inclination to look
into it. if someone else wants to come up with a patch, that's fine.
-----------------------------------------------------------------------
davidfraser - 2004-08-30 08:19 UTC
-----------------------------------------------------------------------
I have tested with a list of about 13000 images
Bringing up the list by saying Edit list ... from the desktop settings
page no longer uses up lots of memory in the CVS version as it used to in
4.0.x
However, it did use up lots of CPU (I waited 10 minutes and then
interrupted it)
Debugging showed that this was happening in
xfdesktop/settings/backdrop-mgr.c in check_image.c - basically all the
images in a list are read into a pixbuf to check that they are valid.
Disabling this code caused the list to come up quickly.
Then I looked in CVS and saw that this has been fixed there :-)
-----------------------------------------------------------------------
kelnos - 2004-08-30 08:36 UTC
-----------------------------------------------------------------------
i wrote a short routine for CVS that doesn't actually load the entire
image, but just stuffs enough data into a pixbuf loader until the loader
can verify that it is indeed a valid image, and then it closes it. for
most image formats, i would guess that this involves just a few kB of the
file. it still will take a long time (linear time with respect to the #
of images) and eat up CPU, but nowhere near as much time as it used to
(plus, the progress bar now displays a percentage value instead of just
bouncing back and forth).
i'm considering removing the validation entirely and just making sure in a
different way that xfdesktop doesn't try to paint an invalid image to the
desktop. that'll make things a lot faster from the editor's perspective,
but you can then end up with invalid images in the list. i guess it just
depends on whether or not we care about that.
More information about the Xfce-bugs
mailing list