StableStudio icon indicating copy to clipboard operation
StableStudio copied to clipboard

Implement request throttling

Open hkiame opened this issue 1 year ago • 4 comments

Is your feature request related to a problem? Please describe.

When the user clicks the dream button multiple times rapidly, it triggers multiple requests simultaneously, instead of waiting for the first request to be processed

Describe the solution you'd like Implement request throttling. You can use techniques like debouncing or disabling the submit button after the first click until the request is processed.

hkiame avatar Jul 28 '23 19:07 hkiame

Throttling is already implemented. StableStudio will queue up requests and send one per second.

KAJdev avatar Jul 29 '23 09:07 KAJdev

@KAJdev How about disabling the submit button after the first click until the request is processed? I would love to work on that. Please assign that to me

hkiame avatar Jul 29 '23 10:07 hkiame

This would actually be removing parallel generations, which is a feature.

KAJdev avatar Jul 29 '23 10:07 KAJdev

@KAJdev didn't know about that. I don't find it good to have the button enabled when there is a request being processed though. All the time I have had the button clicked the 2nd time when there is an going request is by mistake.

hkiame avatar Jul 29 '23 11:07 hkiame