Re: so, is this claim about pango still true? or does nobody actually care?
- From: Billy Biggs <vektor dumbterm net>
- To: Paul Davis <paul linuxaudiosystems com>
- Cc: gtk-list gnome org
- Subject: Re: so, is this claim about pango still true? or does nobody actually care?
- Date: Thu, 13 Oct 2005 23:35:38 -0500
Paul Davis (paul linuxaudiosystems com):
> [...] As a reference the perf issue I was having was most evident when
> updating a textual label (reporting some ADC value) at a rapid rate
> (10x per second or so). Updating 5-10 labels at h the above rate
> (this was reporting data for an outside slow-speed data acquisition
> system) resulted in cpu usage of over 40-60% on a 1200 mhz processor.
> [...]
> -----------------
>
> is this still true? does anybody care? is there a way to avoid pango
> entirely and still get AA fonts inside GTK2? will this ever be fixed
> before everyone is using h/w acceleration to print button labels?
>
> the issue raised here will *kill* ardour dead, and would force us to
> also have to abandon GTK for Qt (a move I would really, really not
> want to make). some clarification would help ....
Clearly people care, see Federico's blog for some of the work done
recently on Pango performance:
http://primates.ximian.com/~federico/news.html
As for your application, I can really only recommend profiling and
making your own conclusions. While I know Pango can be made faster,
given some of the larger applications that use GTK2/Pango successfully
for text rendering, I can't imagine it being too painful for Ardour.
Try the following app. How long does it take to update a label 10000
times on your machine? Is the performance reasonable in your opinion?
I also recommend system-wide profilers such as OProfile or sysprof over
gprof.
-Billy
#include <stdio.h>
#include <string.h>
#include <gtk/gtk.h>
#include <sys/time.h>
#define NUM_UPDATES 10000
int main (int argc, char **argv)
{
GtkWidget *window, *vbox, *label;
struct timeval before, after;
char string [1024];
int i;
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
vbox = gtk_vbox_new (FALSE, 0);
label = gtk_label_new ("A reasonable size for a label");
gtk_container_add (GTK_CONTAINER (vbox), label);
gtk_container_add (GTK_CONTAINER (window), vbox);
gtk_widget_show_all (window);
while (gtk_events_pending ()) gtk_main_iteration ();
gettimeofday (&before, NULL);
for (i = 0; i < NUM_UPDATES; i++) {
sprintf (string, "Updated label value: %d\n", i);
gtk_label_set_text (GTK_LABEL (label), string);
while (gtk_events_pending ()) gtk_main_iteration ();
}
gettimeofday (&after, NULL);
printf ("Time: %ld usec for %d label updates.\n",
((after.tv_sec*1000*1000) + after.tv_usec)
- ((before.tv_sec*1000*1000) + before.tv_usec),
NUM_UPDATES);
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]