Excessive logging is a performance bug. ❌ Symptoms Disk IO spikes Thread pool starvation ✅ Rule Log events, not flows.
Author: ErcanOPAK
.NET Core — Kestrel Has Request Limits You Might Hit
Large uploads fail silently. Default limits Request body size Header count Header length ✅ Fix Explicitly configure limits in Kestrel.
SQL Server — Scalar UDFs Kill Query Parallelism
Scalar functions force serial execution. ❌ Result CPU spikes Slow reports ✅ Fix Inline logic or use inline table-valued functions.
SQL Server — TOP (1) Without ORDER BY Is Undefined
SELECT TOP 1 * FROM Orders ❌ Problem Result can change between executions. ✅ Always do ORDER BY CreatedAt DESC
C# — Async State Machines Increase Memory Usage
Every async method allocates a state machine. 🧠 Impact High-throughput services suffer Hot paths amplify cost ✅ Optimization Use sync methods when no awaits are needed.
C# — ConcurrentDictionary Is Not Always Faster
Many devs replace Dictionary blindly. ❌ Reality Slower for low contention Higher memory usage Locks still exist internally ✅ Rule Use ConcurrentDictionary only under real concurrency.
C# — Why readonly struct Can Be Slower Than class
readonly struct looks like a performance win. ❌ Hidden cost Defensive copies are created when passed by value Happens silently in method calls ✅ Fix Pass by in: void Process(in MyStruct value)
Visual Studio — Solution Filters Save Massive Load Time
Large solutions load slowly. Fix Use .slnf (Solution Filter) Load only what you need Faster startup Lower memory usage
WordPress — wp_posts Without Indexes Is a Time Bomb
Large blogs suffer without proper indexes. Must-have (post_type, post_status) (post_date) Speeds up homepage and archives drastically.
Windows 11 — NTFS Compression Slows Modern SSDs
Compression helped HDDs — not SSDs. Recommendation Disable NTFS compression on code folders.
Windows 11 — Fast Startup Breaks Dual Boot & Updates
Fast Startup isn’t a full shutdown. Fix Disable it in Power Options to avoid: Locked filesystems Update failures Boot inconsistencies
AJAX — Network Tab Lies About Timing
Browser timing includes: DNS SSL Queuing Connection reuse Real insight Use Server-Timing headers for truth.
JavaScript — structuredClone() Beats JSON Tricks
Instead of: JSON.parse(JSON.stringify(obj)) Use: structuredClone(obj); Why Preserves Dates, Maps, Sets Faster Safer
HTML5 — Is Still Often Wrong
Bad viewport = broken mobile UX. <meta name=”viewport” content=”width=device-width, initial-scale=1″> Without this, mobile layouts lie.
CSS — contain Property Prevents Reflow Cascades
.card { contain: layout paint; } Why this is huge Stops layout recalculation spreading Massive UI performance win on large pages
.NET Core — Response Compression Isn’t Enabled by Default
Many APIs forget this. builder.Services.AddResponseCompression(); app.UseResponseCompression(); Result Smaller payloads Faster mobile clients Lower bandwidth costs
.NET Core — MapGroup() for API Versioning Without Pain
var v1 = app.MapGroup(“/api/v1”); v1.MapGet(“/users”, GetUsers); Benefits Cleaner routing Shared filters & auth Scales beautifully
SQL Server — Nonclustered Index INCLUDE Is a Superpower
CREATE INDEX IX_User_Email ON Users(Id) INCLUDE (Email, CreatedAt) Why this matters Eliminates key lookups Massive speedups for read-heavy queries
SQL Server — COUNT(*) vs COUNT(column) Is Not the Same
SELECT COUNT(*) FROM Orders Why COUNT(*) is faster Doesn’t check for NULL Uses metadata when possible Avoid COUNT(column) unless required.
C# — Boxing in Interfaces Slows Hot Paths
void Log(IFormattable value) Passing structs through interfaces causes boxing. Fix Use generics: void Log<T>(T value) where T : IFormattable Result: zero allocations, faster execution.
C# — WeakReference Prevents Hidden Memory Leaks
Event subscriptions can keep objects alive forever. var weak = new WeakReference<MyService>(service); Use case Caching Event listeners Plugin systems Prevents objects from surviving longer than intended.
C# — ArrayPool: Stop Allocating, Start Reusing
Allocating large arrays repeatedly kills performance. var pool = ArrayPool<byte>.Shared; var buffer = pool.Rent(4096); // use buffer pool.Return(buffer); Why this matters Reduces GC pressure dramatically Ideal for serializers, streams, IO-heavy code Used internally by ASP.NET Core ⚠ Always return the array — leaks are silent.
IntelliSense Slow? It’s the Node.js Server
VS runs a Node process for JS/TS language services. ✅ Fix Restart TS server from command palette.
WP-Cron Runs on User Requests (Not Real Cron)
Low traffic = delayed jobs. ✅ Fix Disable WP-Cron and use system cron instead.
WSL2 Eating RAM Even When Idle
WSL does not release memory by default. ✅ Fix Add .wslconfig: memory=4GB
Windows 11 Killing Background Tasks Aggressively
Modern standby suspends background apps. ✅ Fix Disable aggressive power throttling per app.
Silent JSON Parsing Failures
Backend returns HTML error page → JS crashes silently. ✅ Fix Always check: response.headers.get(“content-type”) Before parsing JSON.
Microtasks vs Macrotasks — Why setTimeout(0) Lies
Promise.then() // microtask setTimeout() // macrotask 🔥 Reality Microtasks run before repaint. This affects rendering bugs and race conditions.
required Attribute Is NOT Validation
HTML validation can be bypassed easily. ✅ Rule Never trust client-side validation. Always validate server-side.
position: sticky Stops Working Because of Parents
Sticky fails if any parent has: overflow: hidden; 🧠 Fix Remove overflow or move sticky element higher.








