GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Sun Oct 26, 2014 9:31 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Re: GTK2 text rendering - broken, or just the laws of math?
PostPosted: Thu Feb 16, 2012 10:36 am 
Offline
Never Seen the Sunlight

Joined: Thu Mar 24, 2011 2:10 pm
Posts: 328
Location: Sydney, Australia
What you are doing with a GtkTextView is very different due to the large buffer sizes. When you start asking for lots of memory you can cause processing delays due to the increasing difficulty in finding some.
Tell me are you making sure to free all memory in between iterations?


Top
 Profile  
 
 Post subject: Re: GTK2 text rendering - broken, or just the laws of math?
PostPosted: Thu Feb 16, 2012 8:15 pm 
Offline
GTK+ Geek

Joined: Sat Sep 26, 2009 6:41 am
Posts: 69
Interesting... I have a gtktextbuffer/textview application which (informally tested) reads an xml file of 3.7MB, and extracts the included text to a text buffer; the text appears in under three seconds, scrollable throughout - so that's included the libxml decoding. The text includes italic and bold information which is also properly displayed, though only a single-sized font is used for this import.

Writing the result as an HTML file (again, via libxml) takes again, about three seconds. The output HTML file is around 600kB. Reading that HTML file takes under a second...

The more changes I make in the text, the longer it takes to save; by the time I have edited the entire text - perhaps a hundred and fifty thousand words - and included titles and headers at various levels, it can take ten seconds, maybe fifteen sometimes, to save - I'm guessing this is to do with internal memory allocation.

The machine is nothing special; an intel core 2 duo at two gig, with 8 gig memory on hand, running Mint 10 linux, with Gnome 2.

Neil


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group