Tux Paint now starts up in just over 1 second, 640x480,
with everything enabled. Memory usage has dropped
dramatically. Stamp scrolling will be a bit rough the
first time through; that is fixable with a prefetch
process in case it matters. There are two empty functions,
flip_surface() and mirror_surface(), that need code.

Very little is now kept in memory. Each stamp get a
5-word struct. Once scrolled to, sound and text may
get attached to this struct. It would be good to free
the sound data when not needed, but I'd have to see
what SDL thinks of that. (the sound might be playing)

Here is some data from the "top" program:

PID  USER    VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND 
8696 root    157m 137m  25m S  0.0 27.3 315:57.14 XFree86 
8812 albert  128m  93m  45m S  0.0 18.6  60:29.86 firefox-bin 
8838 albert  128m  93m  45m S  0.0 18.6   0:00.15 firefox-bin 
8839 albert  128m  93m  45m S  0.0 18.6   0:04.73 firefox-bin 
8841 albert  128m  93m  45m S  0.0 18.6   0:37.76 firefox-bin 
7382 albert  128m  93m  45m S  0.0 18.6   0:00.02 firefox-bin 
9536 albert 85500  73m 9264 S  0.0 14.7   0:17.64 tuxpaint.old 
9537 albert 85500  73m 9264 S  0.0 14.7   0:00.00 tuxpaint.old 
9538 albert 85500  73m 9264 S  0.0 14.7   0:00.00 tuxpaint.old 
9539 albert 85500  73m 9264 S  0.0 14.7   0:00.00 tuxpaint.old 
9540 albert 32292  21m 9268 S  0.0  4.4   0:00.69 tuxpaint 
9542 albert 32292  21m 9268 S  0.0  4.4   0:00.00 tuxpaint 
9543 albert 32292  21m 9268 S  0.0  4.4   0:00.00 tuxpaint 
9544 albert 32292  21m 9268 S  0.0  4.4   0:00.03 tuxpaint 

So, what is the remaining 21 MB going to?

Merging the *.dat file into the *.txt file (or PNG text)
would speed things up. Disk seeks are deadly.


_______________________________________________
Tuxpaint-dev mailing list
Tuxpaint-dev@tux4kids.net
http://tux4kids.net/mailman/listinfo/tuxpaint-dev

Reply via email to