When the window is resized using mouse dragging, the resize event fires many times and for each time the syncHeights() function is called and makes the page very slow if there are hundreds of items.
So, When the user starts dragging to resize the window, resize event will not fired i.e. syncHeights() function should not be called until the user ends dragging. The syncHeights() function will be called once the drag ends and the window is resized to the final width.
When the window is resized using mouse dragging, the resize event fires many times and for each time the syncHeights() function is called and makes the page very slow if there are hundreds of items. So, When the user starts dragging to resize the window, resize event will not fired i.e. syncHeights() function should not be called until the user ends dragging. The syncHeights() function will be called once the drag ends and the window is resized to the final width.