Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
faster scrolling in smaller lists #1526
Faster scrolling, particularly in lists whose length is under about 70 or so, where previously the max speed was around 10 items per second, which is a bit on the slow side. It's now 30 items per second at full speed (and minimum 10 items per second during ramp-up).
I've also clarified the comments (which were correct, though perhaps not obviously so from the code) and made the code more explicit - please let me know if I can make these even more obvious if it's not understandable.
Doing as a PR because, while this works perfectly for me, I can't test on other systems and don't want to cause too much churn in master.
Works fine on win32 and OSX with the keyboard, which correctly reports held status. If a remote isn't reporting held status, then it won't even get to this code, so the problem is elsewhere.
Ok i've tested this.
OSX with keyboard - fine (was fine for me before too)
FPS go down to 5 - 10 fps in that list. On list with fanart in the bg even down to 3 fps
Here another example where you can hear that the key hold is right (sound ramps up).
And here how it should be (linux):
I think this is just the lack of power of the atv2. Not sure if that frame duration assumptions made in the code (if any) might conflict on those low power boxes and make the behaviour even wonkier than it could be.
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
@Memphiz There's an assumption of at least 20fps, so any slower than that and it will be slower by that factor (i.e. 10fps will be twice as slow) - it simply means that we're not processing the input fast enough. Try dropping it to 10 (i.e. increase the number in the frameDuration min() call to 100. I wouldn't want to go much lower than that tbh (note that your addon view has fanart in it, that's why it's likely slow as the frame is being stalled while the fanart uploads to the GPU).
Simple way to check if the hold state is working is to scroll to the end of the list and check whether it wraps - if held is set it won't wrap. From your videos it looks OK.