APIs are the backbone of modern applications, but even the cleanest code can drag if performance isn’t top of mind.
Very often, I receive this ques...
For further actions, you may consider blocking this person and/or reporting abuse
Cool tips. Just to note if you use projections, as long as you’re not projecting the entire entity, you don’t need to add AsNoTracking, it’s implicit.
Thanks for the tip!
I am not so expert in EF. :)
Didn't know about this. Thanks for sharing!
I thought pagination was a well-known strategy until I found multiple systems with performance issues by retrieving entire tables from the database and dumping them on the screen. Arrggg!
Hey Emanuele, good piece as always!
About caching: instead of memory or distributed, just go hybrid with FusionCache or HybridCache from Microsoft (or FusionCache via the HybridCache adapter).
Here's why:
With a hybrid cache like FusionCache the code always stays the same even if you add an L2 (distributed cache), it's fast as a memory cache, handles cold starts and horizontal scalability like a distributed cache, serialization is already taken care of and you always have full stampede protection.
My 2 cents.
nice tips Emanuele! thank you!
They come directly from my private knowledge base on my Notion 😊
Cool. I use Obsidian so can can keep m private wiki in source control and never have to worry about Notion not being available. I think the fear stems from clickup, a task/project management tools I used to use, going offline from time to time with my docs and tasks being unavailable.
Do you find Notion is sometimes unavailable?
You don't need
AsNoTracking
on Select queries, they are read-onlyProjection is automatically rendering AsNoTracking() pointless.
Anyways, lots of informative content. Thx
I read it in another comment, and yes. It works as you said.