Re: [gtk-list] Re: loading pixmap from file slow



> 
> I suspect this is because there's a call to gdk_color_alloc for each pixel
> in the xpm. The xpm loader should probably be rewritten to use a color context
> instead. As I'm guilty of writing the original slow version, I guess
> I'll have to take a hack at it soon; it shouldn't be too hard. If you're in
> a hurry I guess you'll have to take a look at imlib.
> 
> 
> tomb@gimp.org

  That brings up a question from my side :-) is there a performance
  difference between using the GDK call to load a pixmap from a
  file vs. using the GDK call to 'load' it from memory.

  #include "mypixmap.xpm"
  pixmap = gdk_pixmap_create_from_xpm_d(dlgwin->window,  &mask,
				    &style->bg[GTK_STATE_NORMAL], 
				    (gchar **)w95error);

          vs
  pixmap = gdk_pixmap_create_from_xpm(dlgwin->window, &mask,
                                      &style->bg[GTK_STATE_NORMAL],
				       iconFile);


  Well, I mean there *is* difference between memory fetch and disk
  fetch, what I meant with the question above is that if still a
  call is made to gdk_color_alloc for every pixel. I am not familiar
  with those details so...
  		
			cheers,
				emilio
-- 
      __o          "Admit nothing, deny everything, demand proof. :)"
    _`\<,_           -James Ebbs
___(*)/_(*)____.___o____..___..o...________ooO..._____________________
                    D. Emilio Grimaldo Tunon
http://www.iaehv.nl/users/grimaldo/
http://www.iaehv.nl/users/grimaldo/cv/
http://www.iaehv.nl/users/grimaldo/panama.html
http://www.iaehv.nl/users/grimaldo/Linux/



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