|
Rockbox mail archiveSubject: Annouce: patch to speed up SOME list scrolling by a factor of ~12Annouce: patch to speed up SOME list scrolling by a factor of ~12
From: <postmaster_at_diffenbach.org>
Date: Sat, 24 Jun 2006 02:30:44 -0400 A patch to optimize apps/gui/list.c, function gui_list_draw. Previously, all lists were always redrawn in their entirety. With this patch, when the list's start position (the item at the top of the list) hasn't changed, only the /lines/ changed are updated. In almost all cases, that means only two lines are updated, the line the cursor is leaving and the line to cursor is moving to. When a list's start position changes, or when a new list is shown, the whole list is re-drawn using the original cvs code. Provision is made to handle the "pointer" cursor as well as the standard inverted bar cursor. The speed increase depends on the font used; the smaller the font, the more lines have to be drawn to fill the screen, and so the greater the speed savings. Here's a non-controlled sample of the average speeds of the regular and the optimized list redrawing, in microseconds, for several font sizes, on my Ipod Video (G5, 60GB, using only 32MB of memory, that is, build 15): Font Height Average Unoptimized Average Optimized Ratio of Unoptimized/Optimized 5 123039.71 4555.51 27.01 7 128322.65 15404.24 8.33 14 116112.13 7363.98 15.77 16 128704.18 8046.00 16.00 24 130604.73 20603.50 6.34 For ipods, there's an often mentioned problem of music play stopping when lists are scrolled. This will not fix the problem, but will alleviate it quite a bit. Please perform the following experiment before using this patch in build. Using your current build, play a song, then go to the menu and rapidly scroll up and down the list until the music stops playing. Then try the same using a build with this patch. Then do a logfdump (Menu|Info|Debug|logfdump), and mail the file logf.txt in your device's .rockbox directory to: gui_list_opt AT diffenbach.org Note that a peculiarity of tagcache makes this a bit more complex than it would otherwise be; tagcache uses the same gui_list structure for ALL its lists. The patch can be found on the patch tracker, here: http://www.rockbox.org/tracker/task/5591 Thanks. Received on 2006-06-24 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |