-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Web] Research for long running actions
(~ Web Worker)
#10855
Comments
Web Worker
long running actions
(~ Web Worker)
See the proof of concept and all related information here: #10916 It feels pretty stable to me, however, I'd recommend to start using it in small incrementions. First we should think about where exactly we want to use this functionality. Looking at #7039, the following 4 are probably good candidates:
Then there are 2 more scenarios to think of: uploading and token refresh. Uploading is not necessary IMO. Yes, it happens in the main thread, but it's already a non-blocking async operation and the user can navigate freely within the application. Also, I don't think we can simply introduce web workers in Uppy. Token refresh is a bit more complicated. I'm gonna start with saying that I have absolutely no idea if and how we could introduce web workers here, especially since a big chunk of the functionality is located in the oidc lib we're using (btw this is a known issue: authts/oidc-client-ts#954). I'd handle this topic completely separate to be honest, starting with optimizing our token refresh process. It currently re-loads hundreds of assets which results in an error when the network connection is slow. Maybe something similar happens when the browser tab is being throttled? Then we could try doing the token renewal earlier than 10 seconds before expiry, at least if the the token lifespan is > 5 minutes. |
Update to this statement:
@kulmann and I did a brainstorming yesterday and found a promising approach. The idea is to just put the timer in a worker, but keep the actual token renewal in the main thread. I'm currently implementing this approach. For the other operations (copy, move, retry) I'm going to create separate stories so we can tackle them in the next sprint(s). Since the research part is done and documented here (and in #10916), I'm closing this issue. |
research ticket for: #7039
The text was updated successfully, but these errors were encountered: