This hash look up in calculateColorProfile is the slowest part of saving an image.
treeform opened this issue · comments
I have profiled nimPNG code saving with VTune and 45% of the time is spent on this line:
Line 2358 in 676bca4
This line is in calculateColorProfile ... should it just be computed once? It seems like a very slow operation with the hashing taking up most of the time. Is there a way to compute calculateColorProfile only once?
I used vTune with nim c -d:release --debugger:native
to produce this.
Thank you, I think I know what's wrong with the hash function.