Re: gtk_text_insert very slow....



Julien Schmitt wrote:

Hi,

Here is my problem :

I am writing a little GTK program which should work like the Windows' "Hyper Terminal". I use a GIOChannel to 
read the serial port and a callback connected with g_io_add_watch to print the received caracter in a GtkText (with 
gtk_text_insert) .
So, each time I receive a byte on my serial port I print it immediately through this callback in my 
GtkEditable.
My problem is quite strange :
it works perfectlty when I have no gtk theme installed but when I have a theme with pixmaps , the 
gtk_text_insert function is very slow ! I think my program only prints 5 caracters per second approximately...


I've run into this lately, too. I'm under the impression that the new 2.0 text widget resolves many of these types of performance issues, does anyone know if that's correct? In the meantime, you might try buffering your data and doing inserts at some periodic interval using a timer or an idle callback.

Regards,
Timothy M. Shead
tshead k-3d com





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