Optimization question

I'm working on a space station simulation and I need some optimization
advice.  The bottleneck is definitely the altitude reading.  It consists
of a 6-digit number that is rendered to the screen using images (PNGs).
To create the feeling of real time, this number is updated every 10

I definitely want to use images for the simulation.  It is intended for
preschoolers so it should look nice.

I have a few questions:
1)  Is there any particular format that is rendered faster than the
others?  I am using PNGs right now.  Should I use something else?

2)  How does Gtk manage memory?  If one object is hidden by another, is
the first still in memory?  I ask because currently the altitude reading
belongs to a canvas group.  Every time that the altitude is updated (every
10 milliseconds) I destroy the group and build an entirely new one.

    This must consume a lot of CPU power.  I thought that I might just
draw the new number on top each time.  However, if the old ones will
remain in memory, this approach would suck the entire system's memory very

Any advice on this matter would be much appreciated.

Thanks in advance,

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