on Win32, --enable-gdiplus makes pixbuf loading 6 times slower



We're developing a photo management application which uses GTK on Win32 using the prebuilt GTK binaries available at http://ftp.gnome.org/pub/GNOME/binaries/win32/gtk+/ . We noticed that pixbuf loading (via gdk_pixbuf_new_from_file) slowed down massively (by a factor of >6) in the transition from GTK 2.18.1 to GTK 2.18.3, and has remained slow ever since. This has made the newer binary releases unusable for us.

It appears that starting with GTK 2.18.3, Windows binaries have been configured using --enable-gdiplus to enable the GDI+ pixbuf loader (see http://aruiz.synaptia.net/siliconisland/2009/08/dear-lazyweb-gtk-need-gdi-help.html), even though --enable-gdiplus is apparently still off by default in configure.in. I believe that Tor Lindquist builds the Windows GTK binaries. Tor, can you confirm that you turned on --enable-gdiplus starting with GTK 2.18.3? I think we should probably build without GDI+ until/unless its pixbuf loading can be made faster.

Here's a test program in C which you can use to see how long pixbufs take to load.

// load.c
// to build: gcc -Wall load.c `pkg-config --cflags --libs gtk+-2.0` -o load
#include <stdio.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gtk/gtk.h>

int main(int argc, char *argv[]) {
   gtk_init(&argc, &argv);
int i;
   for (i = 1 ; i < argc ; ++i) {
       GError *error = NULL;
       GdkPixbuf *p = gdk_pixbuf_new_from_file(argv[i], &error);
       printf(p ? "imported %s\n" : "import error: %s\n", argv[i]);
   }
   return 0;
}
// end

-adam



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