-
-
Notifications
You must be signed in to change notification settings - Fork 125
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
Generating multiple images output issue #85
Comments
Hi @iamparthaonline 👋 Thank you for posting this issue. Is it possible to share with me some reproduction code? |
Hi @frinyvonnick , so this are the puppeteer config that I'm using, Then I'm creating an array of image properties inside a for loop, After that I'm running multiple image generation by calling once ( out side the loop ), Now as the document stated data should have an array of image buffers, and i expect the output to be in the same order as imagesBeingProcessed , but it's not giving like that ( it's giving in random order or some images are missing in between) and also some images aren't even present even though the length of data is same as imagesBeingProcessed. P.S. Single image generation works like a charm. I used to do multiple single image generation, but because of performance optimization, I'm trying out the multiple-image generation by single call approach. Also, any performance-related advice will be really helpful. |
Thank you for your complete answer. I'll try to reproduce your issue as soon as possible. Regarding the performance part there is an issue on the subject. |
This probably has to do with how To maintain the ordering AFAIK you could spawn a single instance in the cluster, which will then render the images in order. This of course comes with a performance hit. |
I have been doing what you said, spawning a single instance and let it handle images one by one. This is really performance heavy that's why I'm trying to understand how can we make benefit out of |
Also found myself experiencing this - happy to have stumbled across this thread ^^ . I guess if node-html-to-image/src/index.js Line 29 in 701b514
|
Thank you for sharing @increpare, feel free to open a pull request. It could be great to write a test that reproduce the issue and try your patch to see if it fixes it 👍 |
Published in v3.2.1 🚀 |
When I am trying to generate multiple image files by using array of values in content property as specified in the readme section below,
Generating multiple images
It gives 2 peculire issues -
The text was updated successfully, but these errors were encountered: