>I observed that scrolling was noticeable slower when the handle for the
>field content contained a large amount (>32K) of data.  In an attempt to
>figure out whether it was my use of fields that caused the slow down or not,
>I hacked the database (I'm putting database record handles in the field) to
>put a NULL terminator in the middle of the text.
>
>The result was a visible increase in scroll speed - an increase which got
>bigger the closer that NULL was placed to the current scroll position.  This
>seems to imply that the word-wrapping algorithm for fields always scans to
>the null-terminator.
>
>If this is correct, is it really necessary to do that, i.e., is there some
>hope that Palm will improve this?  If this isn't correct, what am I missing,
>and is there something I can do to improve scroll performance?

Which direction are you scrolling?

When scrolling up, the field code scans backwards in the text for the 
first preceding linefeed character (or reaches the beginning of the 
text), and then wraps the text forward from there until it finds the 
end of the line immediately before the first visible line. So if 
you've got a lot of text without any linefeeds, then it will take a 
long time to scroll up.

When scrolling down, it just wraps the next line, thus the total 
length of following text shouldn't matter.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to