Tweet fixado
Steven T. Cramer #dotnet
3.5K posts

Steven T. Cramer #dotnet
@StevenTCramer
Author of TimeWarp.State https://t.co/wQuANCMaaD npub1dh5md7ysepkc2eqne5cmy2prvxscgadchtjwyapjrq67guvnmgfsf7fqg4
Entrou em Kasım 2009
4.5K Seguindo1.6K Seguidores

What’s wrong with this EF Core code?
Technically? Nothing.
Performance-wise? A lot, potentially.
Here is a common mistake I see developers make when pulling data:
❌ Fetching the entire entity (all the columns).
❌ Mapping that data into an object in memory.
This pulls down way more data than you actually need. It wastes memory, hogs network bandwidth, and slows your app down unnecessarily.
✅ The fix? Project your data.
Use .Select() to grab only the specific fields you need right inside the query.
This way, the database does less work, less data travels over the network, and your app stays lightning-fast.
Want more practical tips for speeding up EF Core?
Check out my full guide here: milanjovanovic.tech/blog/how-i-mad…
When was the last time you checked your queries for bloated data?
---
Tired of writing the same boilerplate code for every new project? Skip the setup and start building features immediately with my Clean Architecture template: milanjovanovic.tech/templates/clea…

English

Steven T. Cramer #dotnet retweetou

.𝗡𝗘𝗧 𝟭𝟬 𝗶𝘀 𝗳𝗮𝘀𝘁𝗲𝗿 𝘁𝗵𝗮𝗻 𝗝𝗮𝘃𝗮, 𝗚𝗼, 𝗣𝘆𝘁𝗵𝗼𝗻, 𝗡𝗼𝗱𝗲𝗝𝘀 𝗮𝗻𝗱 𝗣𝗛𝗣
Why .NET is the best platform in build projects in .NET 2025
Why is .NET so fast?
- 𝗔𝗱𝗮𝗽𝘁𝗶𝘃𝗲 𝗦𝗲𝗿𝘃𝗲𝗿 𝗚𝗖 adjusts in real time, reducing pause frequency and sustaining throughput during traffic spikes.
- 𝗦𝗺𝗮𝗿𝘁𝗲𝗿 𝗝𝗜𝗧 trims warm‑up time and accelerates hot methods, producing consistently shorter response cycles.
- 𝗔𝗱𝘃𝗮𝗻𝗰𝗲𝗱 𝘃𝗲𝗰𝘁𝗼𝗿𝗶𝘇𝗮𝘁𝗶𝗼𝗻 leverages AVX10 and Arm SVE, letting loops process multiple data points per tick.
- 𝗡𝗮𝘁𝗶𝘃𝗲 𝗔𝗢𝗧 further cuts binaries and startup cost, ideal for containers, IoT, and edge workloads.
- 𝗢𝗽𝘁𝗶𝗺𝗶𝘇𝗲𝗱 𝗻𝗲𝘁𝘄𝗼𝗿𝗸𝗶𝗻𝗴 improves socket handling and HTTP/3 support, delivering lower latency for high‑connection services.
- 𝗙𝗮𝘀𝘁𝗲𝗿 𝗝𝗦𝗢𝗡 processing in System.Text.Json reduces allocation, enabling leaner APIs and real‑time data streams.
- 𝗟𝗼𝘄𝗲𝗿 𝗮𝗹𝗹𝗼𝗰𝗮𝘁𝗶𝗼𝗻𝘀 via spans, inline arrays, and pooled buffers lighten GC pressure and memory footprint. 🧩
- 𝗧𝗵𝗿𝗲𝗮𝗱‑𝗽𝗼𝗼𝗹 logic minimizes contention, ensuring asynchronous operations remain smooth under mixed loads.
- 𝗘𝗻𝗵𝗮𝗻𝗰𝗲𝗱 𝗺𝘂𝗹𝘁𝗶𝘁𝗵𝗿𝗲𝗮𝗱𝗶𝗻𝗴 schedules tasks more evenly, unlocking full core capacity for parallel workloads.
- 𝗖𝗿𝘆𝗽𝘁𝗼𝗴𝗿𝗮𝗽𝗵𝘆 𝗿𝗼𝘂𝘁𝗶𝗻𝗲𝘀 are streamlined, providing robust security without incurring excessive computational overhead.
- 𝗖𝗹𝗼𝘂𝗱‑𝗻𝗮𝘁𝗶𝘃𝗲 tooling reduces cold starts and aligns neatly with Kubernetes, simplifying microservice deployment.
- 𝗙𝗶𝗹𝗲 𝗜/𝗢 now buffers intelligently, boosting throughput for applications that read or write extensive data.
- 𝗥𝗲𝗳𝗹𝗲𝗰𝘁𝗶𝗼𝗻 𝗮𝗻𝗱 𝗘𝘅𝗰𝗲𝗽𝘁𝗶𝗼𝗻 pathways are optimized, cutting overhead for dependency injection and dynamic object scenarios.
- 𝗠𝗶𝗻𝗶𝗺𝗮𝗹 𝗔𝗣𝗜𝘀 advance performance in .NET 9, pairing concise code with leading throughput, making .NET 9 more than 15 % faster
.NET 9 outruns these 10 popular web frameworks:
- Java (Spring) – about 2.5× slower
- Go (Fiber) – 1.3× slower
- Node.js (Fastify) – 4× slower
- Python (FastAPI) – 10× slower
- Ruby (Rails) – 20× slower
- PHP (Laravel) – 15× slower
- Kotlin (Ktor) – 2.8× slower
- TypeScript (Deno) – 3.5× slower
- Swift (Vapor) – 2× slower
- Elixir (Phoenix) – 1.7× slower
You will find links to the benchmarks in the comments.
What web framework do you use for your production apps? What are the main reasons you like your current framework?
👉 Subscribe to my newsletter to improve your .NET Skills
—
♻️ Repost to help others learn how fast .NET is
➕ Follow me ( @AntonMartyniuk ) for more

English

Working on this is part of my new job! Even more to come blogs.windows.com/windows-inside…
English

@jamonholmgren 100% AI is shining a light on how poorly we treated developers over the years, with poor context, no evals, and bad tooling.
On the other hand, now that I am a bot manager I appreciate how hard a manager's job really is.
English

If your agent misbehaves and writes the wrong code, don’t tell it to fix the code. And don’t fix it yourself.
Use that valuable context to figure out WHY it did the wrong thing. Tell it the issue, have it analyze its own context, and have it tell you what docs or skills or workflow is wrong, and what improvements would make it make the right decision next time.
Then have it fix those issues. Be very diligent that it gets it right. Be prepared to hand tune this, because you can amortize the improvement over the rest of your project.
Only after that, have it fix the original issue.
English

@SRoot68243 @Tyler_Neville_ Calling Massie a socialist has to be most ignorant post of the day.
English

@Tyler_Neville_ Keep on dreaming clown. We stand behind our President! Not the RINOS and Socialists working against him!
English

Trump is losing his base & support at light speed. Politics seem to be shifting faster than we thought (4th Turning is here).
After Trump's rally in Kentucky against Massie last night, Massie's probability ROSE by almost 10 points on both Kalshi & Polymarket.
The Trump effect is working in reverse now.
Epstein is a way bigger generational issue now-You simply can't just ignore it anymore or you'll be politically punished.
American's seem to be taking a bipartisan stand on this one....
Any contra takes on this?


English

@ryangrim May as well self identify as a virtual chicken. This is nuts.
English

@LundukeJournal @system76 @carlrichell Just kill the stupid bill. Government is NOT the solution to everything.
English

From @system76 CEO, @carlrichell:
“Today, I met with Colorado Senator Matt Ball, co-author of Colorado OS Age Attestation Bill SB26-051.
Sen. Ball suggested excluding open source software from the bill. This appears to be a real possibility.”
Big thumbs up to @carlrichell for taking that initiative and using his position to try to influence the Colorado version of the age verification bill.

English

@thdxr Not to mention Mac and Linux both have plenty of issues.
"don't use windows" is just childish
hopefully soon we can have WASI first Operating System that is better than all, but these are the horses that got us here.
English

whenever we post a windows fix everyone in the replies is like "don't use windows"
we're going to make things work well on all platforms it's not our choice where people want to use opencode
Luke Parker@LukeParkerDev
this is why you need a windows person
English

@burkeholland @_Evan_Boyle @patniko @code @pierceboggan @njukidreborn @martinwoodward Here is a little parting humor, enjoy your week off.

English

On a social media fast for the next week.
All things copilot CLI see @_Evan_Boyle @patniko
All things @code see @pierceboggan and @njukidreborn
Ask to speak to the mgr that’s @martinwoodward
For AI hot takes…haha just kidding you’re already on X.
See you in a week! 😘
English

@thdxr @ibuildthecloud Yes, on prem or in docker or local K8s or cloud if you want.
English

@LukeParkerDev Yeah, Unix guy here :-) I think these days it's either fish (my preference) or zsh.
English

@BenjaminDEKR Thank God the FCC requires this, just imagine the horror otherwise.
English

It isn't all slop actually, but there is just a ton of stuff. The human slop dominated the scene for all of my career. AI in the hands of a craftsman can yield quality code. Just now there are 100 new things and everyone says "Let me show you want I did last night" that it is overwhelming.
I used to ignore the "I have an idea" people now hard to not ignore even the "I have a solution".
English

@thdxr GitHub is becoming social media. How does one get recognized for real value in a repo when viral things and big networks get all the attention?
I sure don’t know the answer.
English





