-
Notifications
You must be signed in to change notification settings - Fork 56
Optimizing parsepngstream #73
Comments
hi Anthony, do you have a simple reproducer ? note for self: |
Here is a reproducer: It works by making 20 pages using copies of two files "hello-world.png", and "hello-mars.png" (attached) so that each process is a separate file. I prepared them like this:
FYI, just processing the same files is a lot faster, (200ms vs. 1.1sec) but that does not match my use case.
here is its profile:
|
I note that JPG vs. PNG processing is 5x faster (by converting the pngs to jpg via convert(1) |
It looks like the hot spots these two nested loops, where the .u8 method is on the image data before it's compressed. Lines 190 to 200 in 504c6dd
and Lines 210 to 223 in 504c6dd
|
Based on profiling my application, image processing is the most CPU-intensive, with parsepngstream using a good bit of the time. Is there an opportunity to optimize this function? Perhaps using image/png from the standard library
Here is my profile:
The text was updated successfully, but these errors were encountered: