eog caches too many images

Bug #37429 reported by Kevin Knerr
10
Affects Status Importance Assigned to Milestone
Eye of GNOME
Fix Released
High
eog (Ubuntu)
Fix Released
Medium
Ubuntu Desktop Bugs

Bug Description

This bug exists when calling eog via nautilus and via the command line.

To reproduce:
Browse to a directory in nautilus that contains 3 or more image files. Right-click on 1 and select open with "Image Viewer". Every file in the directory is cached before eog opens. But if you select 2 or more, then only the selected images are cached.

Open a terminal. For simplicity, cd to a directory containing 3 or more image files. The command "eog image.jpg" will result in caching every image in the directory. Using wildcards results in caching every image as well--if the wildcards match only a single filename. If the wildcard expression matches only some of the filenames, then only the matched files are cached.

In short, eog refuses to cache only 1 image. If only 1 image is selected, it ignores the user's selection and caches every single image. This results in extremely slow performance and at worst, a significant wast of resources because every single image is preloaded by eog.

This behavior exists in both the breezy and dapper packages.

Two suggestions as a result of this behavior:
1) Ensure eog only opens a single image when a single file is selected. (directly fixes this bug)
2) Improve performance by revising the caching method for collections to preloading a smaller number of files.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for your bug. How do you know what image is cached? Do you use the "image collection" option? That seems a feature to me, if you use the image collection you probably want the option to browse the other pictures from the same directory. If you don't want that maybe you should not activate the image collection pane?

Changed in eog:
assignee: nobody → desktop-bugs
status: Unconfirmed → Needs Info
Revision history for this message
Martin Visser (martinvisser99) wrote :

I agree with the reporter. If you open say a CD with a large folder of photos, eog quite happily eats all available CPU, I/O and memory caching the photos in the folder.
The intention of caching is to improve responsiveness however what ends up happening is that eog uses lots of virtual memory.

I think that the caching thread probably needs to be a lot more conservative, maybe it should have a little sleep between reading images. Also it probably needs to only read a few files before and after the displayed image.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Martin, do you use the collection option or not?

Revision history for this message
Kevin Knerr (ld-barthel) wrote :

I know it's caching because when I run eog from a command line it outputs a message as it caches each image.

As far as the "collection option" goes, the only place where I see an option is under the view menu--and it is not checked. My preferred default behavior is to view a single image at a time.

Even so, the problem is not so much the collection option as it is that ***eog caches every image in the directory even though only 1 image was selected for viewing***. When 2 or more are selected, it only caches the selected images.

Revision history for this message
Martin Visser (martinvisser99) wrote :

No, I don't know nothing about the collection option. (This is from a fresh dapper install). If you just insert a CD of images and start viewing them , this undesirable caching occurs

Revision history for this message
Sebastien Bacher (seb128) wrote :

the collection option is the banner with the previews you get on the bottom of the window, you can activate it by using the "F9" key of your keyboard or the menu

Revision history for this message
Sebastien Bacher (seb128) wrote :

marking as unconfirmed if somebody wants to take that upstream which is the right place for it

Changed in eog:
status: Needs Info → Unconfirmed
Revision history for this message
Kevin Knerr (ld-barthel) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for forwarding it! You can mark the bug as confirmed if you get the issue. We usually open an upstream task pointing the bugzilla.gnome.org bug too

Changed in eog:
status: Unconfirmed → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

(to open an upstream task you just have to click on the "Upstream" label bellow the tasks table)

Changed in eog:
status: Unconfirmed → Confirmed
Changed in eog:
status: Confirmed → Fix Released
Revision history for this message
Sebastien Bacher (seb128) wrote :

fixed upstream

Changed in eog:
status: Confirmed → Fix Committed
Revision history for this message
Sebastien Bacher (seb128) wrote :
Download full text (4.0 KiB)

This upload fixes the bug:

 eog (2.19.1-0ubuntu1) gutsy; urgency=low
 .
   * New upstream version:
     - Complete rewrite of application core which means more stable,
       maintanable, faster image viewer for GNOME
     - Editable application toolbar
     - New image collection pane with on-demand thumbnail loading
       (Ubuntu: #37429)
     - Support for setting image collection position (left, right, top,
       bottom) and wether it's resizable or not. No preference UI yet
     - New image properties dialog which replaces the image info sidepane
     - Single instance D-Bus-based activation support
     - Revamped error/warning UI
     - "Open with" support to quickly open images on other applications
     - Mouse scrollwheel improvements: HIG compliancy and zoom factor setting
     - Migration to GtkRecent
     - UI polishing on multiple images save as dialog
     - Command line options for fullscreen, slideshow and image collection
       disabling
     - Rotate work in fullscreen (Ubuntu: #31783)
     - Don't crash when cancelling a slideshow load (Ubuntu: #43322)
     - Trash work on different volume (Ubuntu: #42571)
     - Display the correct window icon (Ubuntu: #43609)
     - Don't write wrong rotation information (Ubuntu: #88248)
     - Enhanced shortcuts work (Ubuntu: #44343)
     Bug fixes:
     - #377123, [eog-ng] implement EogJobSave
     - #319859, "open image with" function
     - #334321, Should be possible move the collection in EOG
     - #316175, EOG gives no error upon opening non image files
     - #432439, Run gtk-update-icon-cache in uninstall-hook
     - #429156, [patch] "Save As" dialog for multiple files is way too ugly
     - #427154, Some strings are not translated in save-as-multiple dialog.
     - #419756, Slideshow background should be black.
     - #404708, eog crashed with SIGSEGV in g_closure_invoke()
     - #404126, Convert debug messages to eog_debug_message
     - #401939, [eog-ng] Remove leaftag support.
     - #399333, EOG-NG crash while opening Print dialog
     - #398250, build bug: missing symbols from libpangoft2
     - #389314, eog should use stock_print-setup from g-i-t for the
                "Page setup..." action
     - #376513, TRACKER: command-line options
     - #355858, switching image forward and back quickly can display wrong image
     - #351040, [eog-ng] use GtkRecent
     - #344140, [eog-ng] remove duplicate code in fullscreen-code
     - #342817, crash trying to view profile image
     - #342103, [patch] [eog-ng] update about dialog
     - #341935, Should not zoom with mouse wheel
     - #341831, [eog-ng] memory usage increases when switching fastly between
                images
     - #341600, [eog-ng] EOG eats a lot o CPU when inactive
     - #340957, Filenames containing numbers are not properly sorted (as how
                nautilus does)
     - #335689, Middle mouse drag should also scroll
     - #327424, progress bar changes view size which forces re-zooming of image
     - #322057, eog print output is corrupt
     - #305823, The rotate buttons on the toolbar are blurred
     - #404907, [eog-ng] Crash when openi...

Read more...

Changed in eog:
status: Fix Committed → Fix Released
Changed in eog:
importance: Unknown → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.