Closed msssk closed 8 years ago
This is awesome. Thanks for the quick response!
@adamdport You're welcome! We're still evaluating this before merging it, but in the meantime if you can run this branch and share your experiences, that would be helpful. Let us know if you encounter any problems.
I'm planning to spend today integrating this branch and I'll let you know how it works out.
However, I still feel that calculating every 15ms as a default is unnecessary. That equates to over 60 calculations every second. For comparison, most movies are filmed at 24 frames per second (42ms per frame).
The default throttle rate of 15ms gives approximately 60 fps, which is the industry standard for a smooth UI experience. In typical situations, this is not only an achievable, but reasonable goal.
It's only in very unusual scenarios where this is not achievable. For OnDemandList
, the row update throttle rate (and method) is configurable, so if you find yourself in one of those uncommon scenarios you can change it.
This PR provides the same configurability for the window resize handler - if 15ms is not suitable in your situation, you change it, or you can debounce instead of throttle.
Agreed that 15ms is typically chosen to meet the goal of 60 fps. It's why it's also the default value for the pagingDelay configuration setting. This PR looks fine to me.
Unfortunately I got pulled off of this and won't be able to test it for awhile. If this is still waiting to be merged when I return to it, I'll be sure to report my findings.
I've cherry picked this PR into v1.1.0 and have had good results. No issues that I can tell.
Thanks @msssk!
Duplicates #1303