Replies: 1 comment
-
Hi Gioacchino, thanks appreciate that!
I took a brief look at their code and yes, it looks like they created their own deep cloner thing (see here), which seems to be a copy of this.
In general MemoryPack is among the fastest serializers (if not the fastest) and less memory hungry: having said that, as you pointed out you shoudl carefully check the behavior because it may have things that are not expected.
In general yes, I may come up with a new BUT. There are limitations to that approach (see here, "Limitation") and some caveats: ![]() In general, serializers allow you to go above and beyond that, with things like support to deserialize interfaces and stuff like that (I've used that in the past). Also, more generally, adding another abstraction/concept I'm not sure would be the best thing to do.
Fair point.
Thanks for sharing your thoughts, always good to get to know new perspectives! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Jody,
first of all, thanks for the amazing work on FusionCache 🙌.
I’ve been experimenting with it and running some benchmarks to compare it with EasyCaching.InMemory.
From my tests, it seems that EasyCaching.InMemory has cloning (serialization on read) enabled by default, while FusionCache (of course) does not.
With auto-clone disabled, FusionCache is 🚀 significantly faster than EasyCaching (in the chart this is the Default one).
With auto-clone enabled, FusionCache becomes much slower than EasyCaching.InMemory.
This makes sense, since cloning is not cheap, so it seems that EasyCaching uses a more optimized strategy here.
I also tried different serializers for the cloning:
👉 My question:
Do you think there’s room for improving the auto-clone implementation in FusionCache, maybe adopting a strategy similar to EasyCaching’s ?
I think this could bring FusionCache many benefits, especially for scenarios where object immutability is important but performance is still critical.
If useful, I can share the benchmark code.
Thanks again for your work. I will wait your thoughts :)
Beta Was this translation helpful? Give feedback.
All reactions