[Cuis-dev] Morph redrawNeeded
Jon Hylands
jhylands at gmail.com
Tue May 2 13:42:10 PDT 2023
Hi everyone,
I'm doing some GUI work on a Raspberry pi 4 that has a 1080p HDMI LCD
screen (in portrait mode).
I have a special morph, which displays a list of nearby airports, sorted by
distance from the user's gps location. The morph can show 9 airports at a
time, and you can smoothly scroll the list (which has a couple hundred
entries in total).
[image: DashPanel.png]
On my desktop, it takes about 14ms to draw the 9 entries, and I get about
11 frames per second scrolling. The scroll code is implemented in a method
called from #mouseMove:localPosition:, and it simply does some math, sets
the scrollPosition variable, and calls #redrawNeeded.
On the rpi4, it takes about 50ms to draw the list, and it averages 2.5
frames per second, which is terrible.
On my desktop, it appears that there is a fairly large gap (50ms) between
the time #redrawNeeded is sent, and the corresponding call to #drawOn: is
sent. This explains the poor performance pretty much in total. What can I
do to make that happen faster?
- Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230502/53073756/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DashPanel.png
Type: image/png
Size: 131851 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230502/53073756/attachment-0001.png>
More information about the Cuis-dev
mailing list