Closed paulolops closed 1 year ago
I went ahead and ran the whole function locally without aws Lambda here are the results when ran with unix "time" command before the command line :
with ImageDPI 70.14s user 4.51s system 326% cpu 22.828 total
with ImagePNG 40.45s user 5.97s system 88% cpu 52.686 total
The user time seems to be the total one
Maybe I understand it wrong but the ImagePNG seems to be handling parallelization quite worse than ImageDPI ?
@paulolops ImagePNG was added because it was a faster method, to directly get PNG bytes from MuPDF. None of the Image* functions support concurrency, see https://github.com/gen2brain/go-fitz/issues/4, so you probably should not use it in such a way.
Hello,
I'm encountering a strange performance issue where between :
The pages I pass to these functions are sent concurrently and results stocked onto channels. The process is running over an AWS Lambda function with more than 10GB of memory (only 300MB of it used at the end according to AWS)
Please tell me if you need additionnal information.
Here is the two different ways I run these functions :
With ImageDPI This is running in parallel
Then the images are read later on to get bytes back
With ImagePNG This is running in parallel
then the channel results are stocked in allPagesBytes
Please tell me if you need any extra information, Thanks for the help, Baptiste FIORiNA