-
Notifications
You must be signed in to change notification settings - Fork 79
Feature Suggestion: Make Library Generation Async #253
Description
When the library is generating, the api call for titles hangs until it's finished without any indication in the browser that it's doing anything.
I intend to make the library generation an async task and include an indicator in the ui to let the user know that the library is regenerating. The backend will return the last cached library if it's currently generating (or if it needs generating). I can probably also make the browser poll for the generate task finishing and re-fetch the updated library when it's done - that would possibly be better served by a server push tool like signalR (or whatever the flask equivalent of that dotnet library is), but if it's just this one poll, that may be overkill, just do a http poll via ajax to a polling endpoint which returns the hash of the cached library so the browser knows when it's ready to re-fetch the regenerated library.
I'll also wire in etag 304 for extra efficiency so it doesn't even need to return the cached library if the browser already cached that exact version.
Just making this issue to reference when I get around to doing it. In the meantime, let me know if I've misunderstood anything.