I don't think I can do much to reduce the number of writes to the screen but there are a few things I can do to make that part of the program more efficient. I have the impression that writing to the screen consumes overwhelmingly more time than my other inefficiencies and I wonder if it's worth it to bother with them. Each transaction is written to a history file which is opened and closed for each write. I could leave it open and eliminate the open and close on each transaction. I'm also using a push-down stack to keep numeric variables that represent the transactions. I could use a circular stack and save a complete line of text for every transaction. Then I wouldn't have to push it down and reformat it for every transaction. My question is compared to the time it takes to write to the display are these kinds of improvements going to make any difference?
You may get better performance by writing to an off-screen window then transfering it to the draw window. I haven't done this myself but I've seen it recommended to others w/ draw performance questions.
I think you might as well keep your db open if you have no reason not to. I doubt the open and close is the primary slowdown, but why do it if you don't need to?
Ultimately, you should try running the emulator profiler or add your own w/ TimGetTicks() as suggested earlier. Without a profiler, you're really just guessing at what's being slow and you're likely to end up working hard trying to improve performance of a bit of code that was already fast to begin with.
We're using Handera 330's at present but we're going to PDA's with faster CPU's (probably Tungstens) in the murky future. Are we likely to see much improvement in screen updates? My impression is that display technologies aren't changing that much.
I would say you're wrong big time here. In my experience, the Tungsten Cs are WAY faster than older devices. If you upgrade to the Tungsten C (or any ARM device probably), I would bet that your problem would disappear w/o any changes to code. I'd suggest trying that out w/ one of your fastest auditors first to see if you can get an immediate solution.
-matt
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
