Closed adamdport closed 8 years ago
In cases where a large number of grids are used (50+ in our case), resizing can cause browsers to become unresponsive. The current implementation of "throttle" is actually permitting resize calculations once per grid every 15ms. Calculating dimensions on all our grids generally takes longer than 15ms, and resize calls end up stacking. We ultimately end up with an unresponsive browser while it finishes several hundred resize calculations. After changing orientation to landscape and back quickly in iOS, we need to wait upwards of 10 seconds for the browser to finish.
I have tested debounce and confirm that it resolves performance issues in the project I'm working on.
I agree that debounce would prevent the grid from recalculating while resizing, but if they stop resizing for a fifth of a second, they will see a resize. IMHO that seems like acceptable UX.
@msssk added a configurable window resize throttle in #1306.
What is this intended to "fix"? Throttling was performed intentionally rather than debouncing so that the grid will still appear responsive as a user resizes the window, but require less frequent overhead. Switching to debounce could potentially cause the grid to look unresponsive while the user is resizing.