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
Fix CrossOriginWorkerMaker
to cache the blob URL
#7571
Conversation
🪼 branch checks and previews
Install Gradio from this PR pip install https://gradio-builds.s3.amazonaws.com/4b090da8b8ccd982cc4bd95efb443a1e44848509/gradio-4.20.1-py3-none-any.whl Install Gradio Python Client from this PR pip install "gradio-client @ git+https://github.com/gradio-app/gradio@4b090da8b8ccd982cc4bd95efb443a1e44848509#subdirectory=client/python" |
🦄 change detectedThis Pull Request includes changes to the following packages.
With the following changelog entry.
Maintainers or the PR author can modify the PR title to modify this entry.
|
ff3da20
to
cc3b2cb
Compare
@whitphx the changes look good, but how should I test this? |
@aliabd
For example,
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great and seem to work well as far as I can test! Thanks @whitphx!
Could we change these functions and variables to use snake_case like the rest of the library?
@pngwn Updated 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome. Thanks again @whitphx!
I'll go ahead and merge this in to get it out for the release. cc @aliabd as well for visibility |
Description
There is a bug that multiple SharedWorker-s are created for the same site when the Lite's worker script (
webworker.js
) is loaded from a different origin throughCrossOriginWorkerMaker
.It is because this part is called every time a new worker is created.
To avoid it, caching mechanism is introduced in this PR.