FlowKit icon indicating copy to clipboard operation
FlowKit copied to clipboard

Cancellable promises in Flowauth frontend

Open Thingus opened this issue 3 years ago • 0 comments

https://javascript.plainenglish.io/canceling-promises-in-javascript-31f4b8524dcd The promises defined in 'api.js' may need to be cancelled mid-run, for a cleaner running frontend - there's no capability to do this right now. Uncancelled promises can take up a browser's resource pool, causing slowdown and delays.

As you cannot abort promises from outside the promise in Javascript, the functions in api.js will need to be adjusted to include some cancel logic.

I don't think this is urgent, as I haven't yet seen it become a problem in the frontend but it's worth doing if we get the time.

Thingus avatar Oct 28 '22 10:10 Thingus