-
Notifications
You must be signed in to change notification settings - Fork 39
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
Cache and prefetch shield files #365
Conversation
✅ Deploy Preview for cheery-moxie-4f1121 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
nice PR
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.
tACK e6191be
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.
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.
tACK b3c1e7e
noticeably faster than the master branch
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.
tACK c71fed4
Took a few attempts for my configuration, but undeniably faster loading speed now. Happy this was taken care of. 🙏
Abstract
When creating or loading a shield wallet, a bunch of helper scripts are fetched from the server sequentially. This happens one time for each thread.
Even though they're cached, a request is still sent to the server to see if the file changed, this creates a noticeable between creating a wallet and getting to the dashboard, particularly on machines with a high number of cores, and/or with a high network latency.
This PR aims to prefetch the required shield files, before they're actually needed. The idea is that by the time someone has created and backed up their seedphrase, the browser would have already fetched the files.
Additionally, this PR adds the util scripts each worker needs in the sapling cache to avoid contacting the server for each worker.
Testing