Re: [Thunar-dev] Problem with thumbnails

2008-02-18 Thread Erik Harrison
On Feb 17, 2008 12:24 PM, Erlend Davidson [EMAIL PROTECTED] wrote:


 Erik Harrison wrote:
  On Feb 17, 2008 6:37 AM, Erlend Davidson [EMAIL PROTECTED] wrote:
 
  Thunar use the generic icon for that mime type.
 
  Or, the thumbnailer should gracefully fail when overwhelmed, and let
  Well the problem is how to tell when you're overwhelmed?  Difference
  people have difference ideas of when a thumbnailer should and shouldn't
  run... I think most people would say don't run if it's going to use swap
  space, I would say don't run if it's going to adversely affect the
  apparent responsiveness of the operating environment.  If you're running
  a remote filesystem (fusesmb / sshfs) then the file-sizes which are safe
  to thumbnail change dramatically.
 
 
 
  Which is why I wasn't arguing for a constant file size. I figured a
  simple timeout would scale nicely.
 
 Actually that would work quite well - a setting in thunar thumbnail
 only files which take under 5 seconds.  In order to handle the
 networked filesystems thunar would remember the size and mimetype of the
 file, and not thumbnail other files in that directory (incl.
 subdirectories) which it believes will take too long.

 Two problems:
 1. if you try and load X MB into machine RAM when only Y MB is available
 (YX) you're still going to get a crash - timeouts don't save you here.
 2. with the above logic, if a machine is under a lot of load it might
 wrongly assume that a perfectly reasonable file is taking too long to
 thumbnail.

Well, it is taking too long, and under that load the file is
unreasonable. The whole point is to have a simple system that scales
well, and I think system load should be taken into account.

Of course, someone has to implement this or the whole discussion is moot.

  What's Nautilus's solution here? We use Nautilus thumbnailers if GConf
  is available, we ought to look and see how they handle this problem -
  do the individual thumbnailers take care of it, or does Nautilus kill
  thumbnailers that misbehave?
 
 Nautilus just does it by filesize, and they never thumbnail files in
 remote filesystems.


 Erlend

 ___
 Thunar-dev mailing list
 Thunar-dev@xfce.org
 http://foo-projects.org/mailman/listinfo/thunar-dev




-- 
Erik
Look at me still talking when there is Science to do
___
Thunar-dev mailing list
Thunar-dev@xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev


Re: [Thunar-dev] Problem with thumbnails

2008-02-18 Thread Tino Keitel
On Sun, Feb 17, 2008 at 12:16:50 -0500, Erik Harrison wrote:
 On Feb 17, 2008 6:37 AM, Erlend Davidson [EMAIL PROTECTED] wrote:
 
   Hehe, high-performance and large images? It is possible to load and
   store thumbnails inside the EXIF data AFAIK. I imagine large JPEGs
   will sometimes have that. The thumbnailer could check for that and
   fail otherwise.
  
  Most images produced by a digital camera will have a thumbnail stored in
  the exiv data (it's the same thumbnail the camera uses to display the
  image on the LCD).  Thunar already extracts those (this came in 0.8.0,
  and gives very good performance).
 
   Or, the thumbnailer should gracefully fail when overwhelmed, and let
   Thunar use the generic icon for that mime type.
  Well the problem is how to tell when you're overwhelmed?  Difference
  people have difference ideas of when a thumbnailer should and shouldn't
  run... I think most people would say don't run if it's going to use swap
  space, I would say don't run if it's going to adversely affect the
  apparent responsiveness of the operating environment.  If you're running
  a remote filesystem (fusesmb / sshfs) then the file-sizes which are safe
  to thumbnail change dramatically.
 
 
 Which is why I wasn't arguing for a constant file size. I figured a
 simple timeout would scale nicely.

Thunar could also set a memory limit to the thumbnailer process (via
ulimit or similar), so that the thumbnailer process is killed if it
starts eating too much memory. Thunar woulld have to find out the hosts
memory size to calculate a sensible limit, though. IMHO a fixed value
would not work well here to satify all users. Another idea is a config
item where the user can set a maximum size for the thumbnailer process.

Regards,
Tino
___
Thunar-dev mailing list
Thunar-dev@xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev


Re: [Thunar-dev] Problem with thumbnails

2008-02-18 Thread Erlend Davidson
Tino Keitel wrote:
 Well the problem is how to tell when you're overwhelmed?  Difference
 people have difference ideas of when a thumbnailer should and shouldn't
 run... I think most people would say don't run if it's going to use swap
 space, I would say don't run if it's going to adversely affect the
 apparent responsiveness of the operating environment.  If you're running
 a remote filesystem (fusesmb / sshfs) then the file-sizes which are safe
 to thumbnail change dramatically.

   
 Which is why I wasn't arguing for a constant file size. I figured a
 simple timeout would scale nicely.
 

 Thunar could also set a memory limit to the thumbnailer process (via
 ulimit or similar), so that the thumbnailer process is killed if it
 starts eating too much memory. Thunar woulld have to find out the hosts
 memory size to calculate a sensible limit, though. IMHO a fixed value
 would not work well here to satify all users. Another idea is a config
 item where the user can set a maximum size for the thumbnailer process.
   
Would ulimit be the best way of doing this?
___
Thunar-dev mailing list
Thunar-dev@xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev


Re: [Thunar-dev] Problem with thumbnails

2008-02-17 Thread Cory Christison




I agree with Erik..

Either that or if someone knows of or can write a really
high-performance thumbnailer for large images... but I dunno about that
one. ;-)

 - Cory Christison

Erik Harrison wrote:

  On Feb 15, 2008 4:24 PM, Erlend Davidson [EMAIL PROTECTED] wrote:
  
  

Radomir Dopieralski wrote:


  Fri, Feb 15, 2008 at 06:16:09PM +0100:

  
  
Hi

Sorry if this has already been discussed, I'm knew to this list and
just tried searching with google.
When I select a big image file in thunar (like a 100-300MB tiff) the
computer hangs. Looking at top output I see thunar-vfs-pixb... using
more than available memory (let say 100MB).
How can I fix this? Is it possible to set a size limit or to
blacklist those files?
I thought about inserting an if just after the call to fstat in
exo_gdk_pixbuf_new_from_file_at_max_size
in file exo-gtk-pixbuf-extensions.c.
Maybe a better solution is to add a parameter specifying the max file
size to the function.
For now I put big files in a separate directory and open them using
the command line.


  
  
According to the thumbnail storage standard on http://freedesktop.org,
you can prevent generation of thumbnails for some files by making
matching files in the "failed" directory.
  

That is true.  It's not a real solution though - this is a bug.

The trouble with having a global size limit in Thunar is that some files
are meant to be big - like video files (where just one frame will be
extracted for the thumbnail).  The limits really have to be decided on a
case-by-case basis for each mimetype.

  
  
Or, the thumbnailer should gracefully fail when overwhelmed, and let
Thunar use the generic icon for that mime type.

  
  
Erlend

___
Thunar-dev mailing list
Thunar-dev@xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev


  
  


  



___
Thunar-dev mailing list
Thunar-dev@xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev


Re: [Thunar-dev] Problem with thumbnails

2008-02-17 Thread Stephan Arts
On Feb 17, 2008 9:54 AM, Cory Christison [EMAIL PROTECTED] wrote:

  I agree with Erik..

  Either that or if someone knows of or can write a really high-performance
 thumbnailer for large images... but I dunno about that one. ;-)

- Cory Christison

Hehe, high-performance and large images? It is possible to load and
store thumbnails inside the EXIF data AFAIK. I imagine large JPEGs
will sometimes have that. The thumbnailer could check for that and
fail otherwise.

-
Stephan
___
Thunar-dev mailing list
Thunar-dev@xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev


Re: [Thunar-dev] Problem with thumbnails

2008-02-17 Thread Erlend Davidson

 Hehe, high-performance and large images? It is possible to load and
 store thumbnails inside the EXIF data AFAIK. I imagine large JPEGs
 will sometimes have that. The thumbnailer could check for that and
 fail otherwise.
   
Most images produced by a digital camera will have a thumbnail stored in 
the exiv data (it's the same thumbnail the camera uses to display the 
image on the LCD).  Thunar already extracts those (this came in 0.8.0, 
and gives very good performance).

 Or, the thumbnailer should gracefully fail when overwhelmed, and let
 Thunar use the generic icon for that mime type.
Well the problem is how to tell when you're overwhelmed?  Difference 
people have difference ideas of when a thumbnailer should and shouldn't 
run... I think most people would say don't run if it's going to use swap 
space, I would say don't run if it's going to adversely affect the 
apparent responsiveness of the operating environment.  If you're running 
a remote filesystem (fusesmb / sshfs) then the file-sizes which are safe 
to thumbnail change dramatically.

One or two of the Thunar-thumbnailers (the goodies.xfce.org ones) will 
refuse to run on large files.  For example the xmgrace thumbnailer (.agr 
files) won't run on files  50MB, because it would actually have to load 
all of that into memory.  But as I said before you cannot apply the same 
logic to video files (they aren't loaded into memory).

Having thumbnailers try and run on large files just to fail is bad... 
for the 3 seconds when it's loading the performance of the user's 
computer will be affected.


Erlend
___
Thunar-dev mailing list
Thunar-dev@xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev


Re: [Thunar-dev] Problem with thumbnails

2008-02-17 Thread Erik Harrison
On Feb 17, 2008 6:37 AM, Erlend Davidson [EMAIL PROTECTED] wrote:

  Hehe, high-performance and large images? It is possible to load and
  store thumbnails inside the EXIF data AFAIK. I imagine large JPEGs
  will sometimes have that. The thumbnailer could check for that and
  fail otherwise.
 
 Most images produced by a digital camera will have a thumbnail stored in
 the exiv data (it's the same thumbnail the camera uses to display the
 image on the LCD).  Thunar already extracts those (this came in 0.8.0,
 and gives very good performance).

  Or, the thumbnailer should gracefully fail when overwhelmed, and let
  Thunar use the generic icon for that mime type.
 Well the problem is how to tell when you're overwhelmed?  Difference
 people have difference ideas of when a thumbnailer should and shouldn't
 run... I think most people would say don't run if it's going to use swap
 space, I would say don't run if it's going to adversely affect the
 apparent responsiveness of the operating environment.  If you're running
 a remote filesystem (fusesmb / sshfs) then the file-sizes which are safe
 to thumbnail change dramatically.


Which is why I wasn't arguing for a constant file size. I figured a
simple timeout would scale nicely.

What's Nautilus's solution here? We use Nautilus thumbnailers if GConf
is available, we ought to look and see how they handle this problem -
do the individual thumbnailers take care of it, or does Nautilus kill
thumbnailers that misbehave?

 One or two of the Thunar-thumbnailers (the goodies.xfce.org ones) will
 refuse to run on large files.  For example the xmgrace thumbnailer (.agr
 files) won't run on files  50MB, because it would actually have to load
 all of that into memory.  But as I said before you cannot apply the same
 logic to video files (they aren't loaded into memory).

 Having thumbnailers try and run on large files just to fail is bad...
 for the 3 seconds when it's loading the performance of the user's
 computer will be affected.


 Erlend

 ___
 Thunar-dev mailing list
 Thunar-dev@xfce.org
 http://foo-projects.org/mailman/listinfo/thunar-dev




-- 
Erik
Look at me still talking when there is Science to do
___
Thunar-dev mailing list
Thunar-dev@xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev


Re: [Thunar-dev] Problem with thumbnails

2008-02-17 Thread Erlend Davidson


Erik Harrison wrote:
 On Feb 17, 2008 6:37 AM, Erlend Davidson [EMAIL PROTECTED] wrote:
   
 Thunar use the generic icon for that mime type.
   
 Or, the thumbnailer should gracefully fail when overwhelmed, and let
 Well the problem is how to tell when you're overwhelmed?  Difference
 people have difference ideas of when a thumbnailer should and shouldn't
 run... I think most people would say don't run if it's going to use swap
 space, I would say don't run if it's going to adversely affect the
 apparent responsiveness of the operating environment.  If you're running
 a remote filesystem (fusesmb / sshfs) then the file-sizes which are safe
 to thumbnail change dramatically.

 

 Which is why I wasn't arguing for a constant file size. I figured a
 simple timeout would scale nicely.
   
Actually that would work quite well - a setting in thunar thumbnail 
only files which take under 5 seconds.  In order to handle the 
networked filesystems thunar would remember the size and mimetype of the 
file, and not thumbnail other files in that directory (incl. 
subdirectories) which it believes will take too long.

Two problems:
1. if you try and load X MB into machine RAM when only Y MB is available 
(YX) you're still going to get a crash - timeouts don't save you here.
2. with the above logic, if a machine is under a lot of load it might 
wrongly assume that a perfectly reasonable file is taking too long to 
thumbnail.
 What's Nautilus's solution here? We use Nautilus thumbnailers if GConf
 is available, we ought to look and see how they handle this problem -
 do the individual thumbnailers take care of it, or does Nautilus kill
 thumbnailers that misbehave?
   
Nautilus just does it by filesize, and they never thumbnail files in 
remote filesystems.

Erlend

___
Thunar-dev mailing list
Thunar-dev@xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev


Re: [Thunar-dev] Problem with thumbnails

2008-02-16 Thread Erik Harrison
On Feb 15, 2008 4:24 PM, Erlend Davidson [EMAIL PROTECTED] wrote:


 Radomir Dopieralski wrote:
  Fri, Feb 15, 2008 at 06:16:09PM +0100:
 
  Hi
 
  Sorry if this has already been discussed, I'm knew to this list and
  just tried searching with google.
  When I select a big image file in thunar (like a 100-300MB tiff) the
  computer hangs. Looking at top output I see thunar-vfs-pixb... using
  more than available memory (let say 100MB).
  How can I fix this? Is it possible to set a size limit or to
  blacklist those files?
  I thought about inserting an if just after the call to fstat in
  exo_gdk_pixbuf_new_from_file_at_max_size
  in file exo-gtk-pixbuf-extensions.c.
  Maybe a better solution is to add a parameter specifying the max file
  size to the function.
  For now I put big files in a separate directory and open them using
  the command line.
 
 
 
  According to the thumbnail storage standard on http://freedesktop.org,
  you can prevent generation of thumbnails for some files by making
  matching files in the failed directory.
 That is true.  It's not a real solution though - this is a bug.

 The trouble with having a global size limit in Thunar is that some files
 are meant to be big - like video files (where just one frame will be
 extracted for the thumbnail).  The limits really have to be decided on a
 case-by-case basis for each mimetype.

Or, the thumbnailer should gracefully fail when overwhelmed, and let
Thunar use the generic icon for that mime type.


 Erlend

 ___
 Thunar-dev mailing list
 Thunar-dev@xfce.org
 http://foo-projects.org/mailman/listinfo/thunar-dev




-- 
Erik
Look at me still talking when there is Science to do
___
Thunar-dev mailing list
Thunar-dev@xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev


[Thunar-dev] Problem with thumbnails

2008-02-15 Thread Andrea Bressan
Hi

Sorry if this has already been discussed, I'm knew to this list and  
just tried searching with google.
When I select a big image file in thunar (like a 100-300MB tiff) the  
computer hangs. Looking at top output I see thunar-vfs-pixb... using  
more than available memory (let say 100MB).
How can I fix this? Is it possible to set a size limit or to  
blacklist those files?
I thought about inserting an if just after the call to fstat in  
exo_gdk_pixbuf_new_from_file_at_max_size
in file exo-gtk-pixbuf-extensions.c.
Maybe a better solution is to add a parameter specifying the max file  
size to the function.
For now I put big files in a separate directory and open them using  
the command line.
Thanks
 Andrea
___
Thunar-dev mailing list
Thunar-dev@xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev


Re: [Thunar-dev] Problem with thumbnails

2008-02-15 Thread Radomir Dopieralski
Fri, Feb 15, 2008 at 06:16:09PM +0100: 
 Hi
 
 Sorry if this has already been discussed, I'm knew to this list and  
 just tried searching with google.
 When I select a big image file in thunar (like a 100-300MB tiff) the  
 computer hangs. Looking at top output I see thunar-vfs-pixb... using  
 more than available memory (let say 100MB).
 How can I fix this? Is it possible to set a size limit or to  
 blacklist those files?
 I thought about inserting an if just after the call to fstat in  
 exo_gdk_pixbuf_new_from_file_at_max_size
 in file exo-gtk-pixbuf-extensions.c.
 Maybe a better solution is to add a parameter specifying the max file  
 size to the function.
 For now I put big files in a separate directory and open them using  
 the command line.


According to the thumbnail storage standard on http://freedesktop.org,
you can prevent generation of thumbnails for some files by making
matching files in the failed directory.

-- 
Radomir `The Sheep' Dopieralski http://sheep.art.pl
  Beauty is the ultimate defense against complexity. -– David Gelernter
___
Thunar-dev mailing list
Thunar-dev@xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev