Re: [gthumb-list] Extremely slow loading of thumbnails



Il 22/03/2012 13:07, Ibragimov Rinat ha scritto:
Thu, 22 Mar 2012 11:05:04 +0100 от Paolo Bacchilega<paolo bacchilega libero it>:
I cannot reproduce the problem, can you post the last part of the
'configure' output after the 'Configuration:' line?


Sorry for putting in, but that's the problem I mentioned earlier, in the beginning of January.
It arises when there are many images in one directory. My test with 20000 images in
one directory reveals that most of cpu time spent inside libglib and libgobject. There is
some big-big cycle which forces generation of same thumbnails again and again.

callgrind shows millions of g_hash_table_lookup, g_type_check_instance_is_a, g_str_hash
and others.

I used the following script to generate those images:
--cut
<?php

     $im = imagecreatetruecolor (200, 60);
     $red = imagecolorallocate ($im, 0xff, 0, 0);
     $black = imagecolorallocate ($im, 0, 0, 0);

     for ($k = 0; $k<  20000; $k ++) {
         $str = sprintf ("image-%06d.png", $k);
         imagefilledrectangle ($im, 0, 0, 199, 59, $black);
         imagestring ($im, 5, 20, 10, $str."!", $red);

         imagepng ($im, $str);
     }

     imagedestroy ($im);

--cut


I tried this script and I still cannot see any performance issue, can you post the full callgrind report?

- Paolo



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]