14 Replies
Here is the image I am using
looks like this if you don't wanna download
With imageskia
with imagesharp
@Waffle Whisperer if you could take a look I would appreciate it
does imagesharp just suck for this kind of thing? lol
I ran the test on m2 macbook air with 16gb of ram btw, the node prod is running on has 4vcpus and 8gb ram
I never used imagesharp, sadly, and I'm a bit bust atm 😅
no worries, I'm just gonna drop in imageskia in prod and see if that fixes things lol
you can ping the creator
he's a member here too I forgot his name
of skia or sharp?
imagesharp
@JBSP
ty
@JBSP Hi, I am wondering if imagesharp has a significantly worse performance than imageskia for resizing/converting images to webp or I am doing something wrong here?
I just tried setting the Method to
WebpEncodingMethod.Fastest
and now it takes an average about 500ms but the CPU/ram usage is still highWebp encoding is currently slower since it’s currently lacking some intrinsics but that code you’ve written concerns me. The task thrashing and locking is going to yield poor benchmark accuracy.
You need to compare like for like also. SkiaSharp will be doing a lower quality resize by default for example. Use BenchmarkDotNet and do proper benchmarks for each operation. Here’s a good example https://github.com/bleroy/core-imaging-playground
p.s Webp is a terrible format. It’s massively slow to encode compared to jpeg and sacrifices size for quality.
GitHub
GitHub - bleroy/core-imaging-playground: This is just me playing ar...
This is just me playing around with .NET imaging libraries. - bleroy/core-imaging-playground
Alright thanks very much for the info, and yes the semaphores were silly, in my production code I put those in as a bandaid cause I was running into resources limits due to high concurrency on compression, but obviously not needed in the benchmark 🤦