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: use one pdf worker for all documents and for all rerenders #762
base: main
Are you sure you want to change the base?
Conversation
5e59480
to
41d6126
Compare
230fd89
to
10ddf61
Compare
be758b5
to
1a9897f
Compare
26a73cc
to
33ea5de
Compare
f5a9fd6
to
9243e45
Compare
fbeabf1
to
240150a
Compare
any progress? will this help when handling large pdf? |
fc18d18
to
304893b
Compare
653aa2c
to
9bb8a85
Compare
any progress? |
No. This could help with multiple instances of React PDF initialized at the same time only.
There are two main concerns. First - is this still even needed if file-loader is no longer recommended and instead, we pass worker URL to PDF.js? Second - the package has been completely rewritten since so this code isn't compatible with the latest head. Although that's a minor issue, it can easily be rebased. |
d5c2c3b
to
f4d4d49
Compare
react-pdf
v5.3 withfile-loader
creates new worker for all file's change and for allDocument
instances, so I create a singleton that reuse worker while rerenders and in different documents