I've developed an image manager that displays a fixed grid of images in thumbnails. The size of the thumbnails is already relatively small, so reducing them further is not an option. To improve performance, I implemented lazy loading and used a debounce function to check if the images are within the visible region. This sped up the launch of my image manager significantly. However, when scrolling while new images are being loaded, the scrolling experience becomes very slow. Is there a way to address this issue or optimize the process of loading images further?
EDIT:
Is there a method to prevent scrolling while a new set of images is being loaded, similar to how Youtube prevents scrolling when more comments are still loading?