Can you tell me how to ensure high performance of writing to the stream? #2572
-
We noticed that saving the images we created (png format) to MemoryStream for some encoder settings is slow for our tasks. For example, download the map tile obtained from OSM at https://tile.openstreetmap.org/6/11/17.png . Let's upload this file in a simple way: Then, let's look at some img instance parameters: Metadata.HorizontalResolution: 96 x 96, Metadata.ResolutionUnits: PixelsPerInch, PixelType.BitsPerPixel BitsPerPixel: 32. And now let's try to save this instance to
This saving works very slowly. The main question: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
What do you mean by very slow? |
Beta Was this translation helpful? Give feedback.
Thanks.
Looks like the images are palette based which will always require quantization. If you test using the new v3.1 alpha (see our readme for the feed details) we have optimized the pipeline to reuse the same palette if available. That should be much faster.
For benchmarking you really shouldn't use anything other than BenchmarkDotnet. Anything else will be wildly inaccurate.