On Fri, 4 Jan 2002, Michael Glickman wrote: > Using storage memory is less efficient than using dynamic heap for write > access, because data storage area is write protected, so that you need > DmWrite or something equivalent (istead of just placing the data, as in > case of dynamic storage), which involves a trap to overcome write > protection. However for reading you souldn't have this problem.
Yeah, I realize it's less efficient in that respect. What I'm trying to find out is how much less. If it's enough for a noticeable slow-down then I'll figure out something else. At most I'll be doing one write per display line (with possible scrolling of the buffer once I reach the end of the fixed space), and I could easily optimize that for one DmWrite call per call to the output function (since one call could produce a few lines of word-wrapped output). > That might be the way to go. Assuming you keep your documents in the > data base, you can probably read straight from the data storage (with no > need to copy them to dynamic heap); I assume you lock only handles for > the records which are currently displayed, otherwise that could get > PalmOS terribly engaged. I'd only be locking them as they were used, when writing output to a window (hidden or visible) and when reading for a redraw. The latter could be a lot of unlocking and locking when using the scrollbar, but I'm not sure what the overhead is there. I do intend to read straight from the database in the display code. ----------------------------------------------------------------------- Brian Smith // avalon73 at arthurian dot nu // http://www.arthurian.nu/ Software Developer // Gamer // Webmaster // System Administrator "Buckle your seatbelt, Dorothy, 'cause Kansas is going bye-bye." -Cypher -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
