Skip to content
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

@react-pdf/renderer taking higher time to generate pdf at node level #1017

Closed
AgarwalShyam opened this issue Sep 29, 2020 · 4 comments
Closed

Comments

@AgarwalShyam
Copy link

AgarwalShyam commented Sep 29, 2020

Describe the bug
Hi Team,

Thanks for this package.

We tried to use this package to generate pdf from react components but we also faced the same issue which is already reported.
#510,
charto/nbind#128

So we tried to move the code at the node level and used the same package @react-pdf/renderer in the controller in node API.
Please find below the way we have implemented but in the actual scenario, the code is bulky and the data volume is pretty high.

image

image

We are able to generate pdf at the node level successfully but we are experiencing high response time. Node js is taking almost 30 sec to generate pdf and time is increasing if request data gets larger. As per our findings, this is due to high CPU utilization.

Expected behavior
Response time should be less

Desktop (please complete the following information):

  • OS: Windows
  • Browser : chrome
  • React-pdf version: 1.6.11("@react-pdf/renderer")

Has anyone implemented @react-pdf/renderer package at node js and getting high response time due to high CPU utilization?

Thanks & Regards,
Shyam Agarwal

@zss1980
Copy link

zss1980 commented Oct 8, 2020

We're having the same issue CPU and memory increase. We're trying to use Puppeteer instead.

@klis87
Copy link

klis87 commented Nov 24, 2020

+1, not to mention it seems to be a memory leak too

@klis87
Copy link

klis87 commented Nov 24, 2020

I noticed that a memory leak was fixed in 1.5.6, so I wil upgrade and let here know this still is the issue

@diegomura
Copy link
Owner

As @klis87 said memory leak is fixed, and latest version also ships a new yoga version with higher memory limit. Closing this now. Let me know if something like this persist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants