Re: [gtk-list] Re: [patch] gdkpixmap patch



On 10 Jun, Andrew Pimlott shouted:
->  > Here's a patch to make the gdk pixmap loader use a color
->  > context for color allocation instead of gdk_color_alloc.
->  > I'm not sure if this speeds things up. Could someone give
->  > me some feedback on that?
->  
->  This improved things markedly on my small test image.  The time spent in 
->  gdk_pixmap_create_from_xpm was about a third of what it was pre-patch.  
->  Curiously, I observed that with the old version, the time to reload the 
->  same image file subsequent times kept increasing significantly (three 
->  seconds, four, five, ...).  With the patch, this does not happen.
->  
->  However, the routine is still unusable for larger images.  My image was 
->  50x50, and took a second to load on a Linux Pentium.  I need to load 
->  images around 300x300 in size.
->  
->  Ok, I finally got gdk_imlib compiled and running.  I copied code from the
->  tutorial on rasterman's page.  It popped up my small test image rapidly,
->  but strangely, it too starts taking _forever_ on larger images (100x100
->  is a snap, 150x150 is over thirty seconds).  Some algorithm is really
->  bad.  I'll find it if nobody has any insights. 

Use PNG. XPM is a CRAP format. Have you checked that the xpm's actually
have <= 256 colors? does sxpm load them? gimp can produce xpm's that
have > 256 colors - according to libXpm (what I regard as the
definative xpm loader) this is nto a legal xpm, (it will not load them)
even tho in theory any number of colors is possible. test everyhting
against libxpm (sxpm is "Show xpm") and u'll prollt fidn it will be
slow too - libxpm also slows sown markedly after loading 50+ xpm's...
Imlib shoudl be the fastest then as it doesnt allocate colors each time
or even try to allocate them.

->  Andrew
->  

-- 
--------------- Codito, ergo sum - "I code, therefore I am" --------------------
raster@rasterman.com       /\___ /\ ___/||\___ ____/|/\___  raster@redhat.com
Carsten Haitzler           | _ //__\\ __||_ __\\ ___|| _ /  Red Hat Advanced
218/21 Conner Drive        || // __ \\_ \ | |   \ _/_|| /   Development Labs
Chapel Hill NC 27514 USA   ||\\\/  \//__/ |_|   /___/||\\   919 547 0012 ext 282
+1 (919) 929 9443, 801 4392   For pure Enlightenmenthttp://www.rasterman.com/ 



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