mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-02-13 13:55:08 -05:00
When the user scrolls in the gallery, we are alerted of the new range of visible images. Then we fetch those specific images. Previously, each change of range triggered a throttled function to fetch that range. The throttle timeout was 100ms. Now, each change of range appends that range to a list of ranges and triggers the throttled fetch. The timeout is increased to 500ms, but to compensate, each fetch handles all ranges that had been accumulated since the last fetch. The result is far fewer network requests, but each of them gets more images.