Skip to content

Bits of .NET

Daily micro-tips for C#, SQL, performance, and scalable backend engineering.

  • Asp.Net Core
  • C#
  • SQL
  • JavaScript
  • CSS
  • About
  • ErcanOPAK.com
  • No Access
  • Privacy Policy

Author: ErcanOPAK

C#

C# LINQ Looks Clean but Runs Slow

- 21.01.26 - ErcanOPAK comment on C# LINQ Looks Clean but Runs Slow

Elegant code, heavy cost. Why it happensDeferred execution over large collections. Why it mattersHidden performance traps. Smart fixMaterialize results when reused. var list = query.ToList();  

Read More
SQL

SQL NULL Handling Breaks Logic

- 21.01.26 - ErcanOPAK comment on SQL NULL Handling Breaks Logic

Counts don’t match reality. Why it happensNULL is not zero. Why it mattersBusiness logic errors. Smart fixAlways handle NULL explicitly. COALESCE(value, 0)  

Read More
SQL

SQL Queries Slow Down Over Time

- 21.01.26 - ErcanOPAK comment on SQL Queries Slow Down Over Time

Same query, worse performance. Why it happensStatistics become outdated. Why it mattersQuery plans degrade. Smart fixUpdate statistics regularly.

Read More
Asp.Net Core

.NET Core Logging Impacts Performance

- 21.01.26 - ErcanOPAK comment on .NET Core Logging Impacts Performance

Verbose logs slow everything. Why it happensSynchronous logging sinks. Why it mattersThroughput drops silently. Smart fixUse async logging providers.

Read More
Asp.Net Core / C#

ASP.NET Core Startup Is Slow

- 21.01.26 - ErcanOPAK comment on ASP.NET Core Startup Is Slow

Cold start hurts APIs. Why it happensHeavy dependency injection setup. Why it mattersFirst-request latency. Smart fixLazy-load expensive services. Lazy<MyService>  

Read More
Git

Git Hooks Prevent Bad Commits Early

- 21.01.26 - ErcanOPAK comment on Git Hooks Prevent Bad Commits Early

Errors reach main branch. Why it happensNo automated checks. Why it mattersBugs spread fast. Smart fixUse pre-commit hooks.

Read More
Git

Git History Becomes Hard to Read

- 21.01.26 - ErcanOPAK comment on Git History Becomes Hard to Read

Too many “fix” commits. Why it happensNo commit hygiene. Why it mattersCode reviews slow down. Smart fixSquash logically related commits.

Read More
Ajax

Ajax Requests Block UI Unexpectedly

- 21.01.26 - ErcanOPAK comment on Ajax Requests Block UI Unexpectedly

User thinks page froze. Why it happensSynchronous requests or heavy callbacks. Why it mattersBad UX perception. Smart fixAlways async + lightweight callbacks.

Read More
JavaScript

JavaScript Memory Grows Without Errors

- 21.01.26 - ErcanOPAK comment on JavaScript Memory Grows Without Errors

No crash, slow death. Why it happensDetached DOM references. Why it mattersLong-running apps degrade silently. Smart fixClear references on element removal. element = null;  

Read More
HTML

HTML Forms Submit Unexpected Data

- 21.01.26 - ErcanOPAK comment on HTML Forms Submit Unexpected Data

Server receives extra fields. Why it happensDisabled fields are excluded; readonly are included. Why it mattersValidation inconsistencies. Smart fixUse readonly when value must be submitted. <input readonly value=”123″ />  

Read More
CSS

CSS Animations Cause Page Jank

- 21.01.26 - ErcanOPAK comment on CSS Animations Cause Page Jank

Smooth animation on desktop, stutter on mobile. Why it happensAnimating layout properties. Why it mattersPoor perceived performance. Smart fixAnimate transform and opacity only. .element { transform: translateX(20px); }  

Read More
Windows

Windows 11 Laptop Battery Drains Faster

- 21.01.26 - ErcanOPAK comment on Windows 11 Laptop Battery Drains Faster

Same usage, less battery. Why it happensBalanced power plan favors responsiveness. Why it mattersPortable workflows suffer. Smart fixCreate a custom power profile.

Read More
Windows

Windows 11 Feels Slower After Updates

- 21.01.26 - ErcanOPAK comment on Windows 11 Feels Slower After Updates

Fresh update, sluggish system. Why it happensBackground indexing and telemetry reset. Why it mattersTemporary performance drop misdiagnosed as hardware issue. Smart fixGive the system time or pause heavy indexing.

Read More
AI

AI Prompt — Decision Making (General)

- 21.01.26 - ErcanOPAK comment on AI Prompt — Decision Making (General)

Help me make a decision by listing pros, cons, hidden risks, and long-term impact. Decision: <DESCRIBE>  

Read More
AI

AI Prompt — Performance Thinking Coach (Coding)

- 21.01.26 - ErcanOPAK comment on AI Prompt — Performance Thinking Coach (Coding)

Explain how this code behaves under high load. Focus on memory, concurrency, and IO. Code: <PASTE CODE>  

Read More
AI

AI Prompt — Code Refactoring With Constraints

- 21.01.26 - ErcanOPAK comment on AI Prompt — Code Refactoring With Constraints

Refactor this code for readability and maintainability. Rules: – No new libraries – No behavior changes – Prefer clarity over cleverness Code: <PASTE CODE>  

Read More
Docker

Docker Images Grow Bigger Every Build

- 21.01.26 - ErcanOPAK comment on Docker Images Grow Bigger Every Build

Same app, bigger image. Why it happensLayer caching invalidated by COPY order. Why it mattersSlower builds, higher registry costs. Smart fixCopy dependency files first, source later.

Read More
Kubernetes

Kubernetes Deployments Succeed But Traffic Fails

- 21.01.26 - ErcanOPAK comment on Kubernetes Deployments Succeed But Traffic Fails

Pods are “Running” — app unreachable. Why it happensService selector does not match pod labels. Why it mattersLooks healthy, acts broken. Smart fixVerify selectors, not just pod status.

Read More
Wordpress

WordPress Media Library Becomes Unusable Over Time

- 21.01.26 - ErcanOPAK comment on WordPress Media Library Becomes Unusable Over Time

Thousands of images, zero control. Why it happensNo folder or taxonomy structure. Why it mattersContent reuse and SEO suffer. Smart fixUse media taxonomy plugins early.

Read More
Wordpress

WordPress Search Feels Slow on Small Sites

- 21.01.26 - ErcanOPAK comment on WordPress Search Feels Slow on Small Sites

Even with few posts, search lags. Why it happensDefault search performs full table scans. Why it mattersPoor UX even on low traffic sites. Smart fixReplace default search with indexed search plugins or custom queries.

Read More
Photoshop

Photoshop Colors Look Different After Export

- 21.01.26 - ErcanOPAK comment on Photoshop Colors Look Different After Export

Design looks perfect — client sees washed colors. Why it happensColor profile mismatch (Adobe RGB vs sRGB). Why it mattersWeb browsers assume sRGB. Smart fixAlways convert to sRGB before export.

Read More
Photoshop

Photoshop File Size Explodes Without Adding Layers

- 21.01.26 - ErcanOPAK comment on Photoshop File Size Explodes Without Adding Layers

PSD jumps from 50MB to 300MB. Why it happensSmart Objects keep embedded source data untouched. Why it mattersVersion control, backups, and collaboration become painful. Smart fixConvert finalized Smart Objects to raster layers.

Read More
Visual Studio

Visual Studio Uses More CPU When Idle Than Expected

- 21.01.26 - ErcanOPAK comment on Visual Studio Uses More CPU When Idle Than Expected

You close the solution… CPU still spikes. Why it happensBackground analyzers and IntelliSense keep running even when no file is open. Why it mattersBattery drain, fan noise, and misleading “system performance” issues. Smart fixDisable unused language services and limit background analysis.

Read More
C#

C# Value Types Copied More Than You Think

- 18.01.26 - ErcanOPAK comment on C# Value Types Copied More Than You Think

Structs feel lightweight. WhyPassed by value. TipUse in keyword. void Process(in MyStruct s) {}  

Read More
C#

C# Async Void Is Dangerous

- 18.01.26 - ErcanOPAK comment on C# Async Void Is Dangerous

Looks async, hides errors. WhyExceptions cannot be awaited. TipAvoid async void.

Read More
C#

C# Foreach vs For Performance Difference

- 18.01.26 - ErcanOPAK comment on C# Foreach vs For Performance Difference

Looks same, runs different. WhyEnumerator allocations. TipUse for in hot paths. for (int i = 0; i < list.Count; i++) {}  

Read More
SQL

SQL Deletes Lock Tables

- 18.01.26 - ErcanOPAK comment on SQL Deletes Lock Tables

Simple delete, big impact. WhyLarge batch deletes. TipDelete in chunks. DELETE TOP (1000) FROM Logs;  

Read More
SQL

SQL Queries Slow Despite Indexes

- 18.01.26 - ErcanOPAK comment on SQL Queries Slow Despite Indexes

Indexes exist, still slow. WhyFunctions used on indexed columns. TipAvoid wrapping indexed columns. WHERE CreatedDate >= ‘2025-01-01’  

Read More
Asp.Net Core / C#

.NET Core APIs Feel Slow Under Load

- 18.01.26 - ErcanOPAK comment on .NET Core APIs Feel Slow Under Load

Low traffic, bad response. WhySynchronous IO usage. TipPrefer async methods. await stream.ReadAsync(buffer);  

Read More
Asp.Net Core

ASP.NET Core Memory Grows Slowly

- 18.01.26 - ErcanOPAK comment on ASP.NET Core Memory Grows Slowly

No crash, but RAM increases. WhyScoped services hold references. TipReview service lifetimes.

Read More
Page 34 of 69
« Previous 1 … 29 30 31 32 33 34 35 36 37 38 39 … 69 Next »

Posts navigation

Older posts
Newer posts
April 2026
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
27282930  
« Mar    

Most Viewed Posts

  • Get the User Name and Domain Name from an Email Address in SQL (950)
  • How to add default value for Entity Framework migrations for DateTime and Bool (859)
  • Get the First and Last Word from a String or Sentence in SQL (837)
  • How to select distinct rows in a datatable in C# (805)
  • How to make theater mode the default for Youtube (754)
  • Add Constraint to SQL Table to ensure email contains @ (578)
  • How to enable, disable and check if Service Broker is enabled on a database in SQL Server (564)
  • Average of all values in a column that are not zero in SQL (531)
  • How to use Map Mode for Vertical Scroll Mode in Visual Studio (489)
  • Find numbers with more than two decimal places in SQL (449)

Recent Posts

  • C#: Use Init-Only Setters for Immutable Objects After Construction
  • C#: Use Expression-Bodied Members for Concise Single-Line Methods
  • C#: Enable Nullable Reference Types to Eliminate Null Reference Exceptions
  • C#: Use Record Types for Immutable Data Objects
  • SQL: Use CTEs for Readable Complex Queries
  • SQL: Use Window Functions for Advanced Analytical Queries
  • .NET Core: Use Background Services for Long-Running Tasks
  • .NET Core: Use Minimal APIs for Lightweight HTTP Services
  • Git: Use Cherry-Pick to Apply Specific Commits Across Branches
  • Git: Use Interactive Rebase to Clean Up Commit History Before Merge

Most Viewed Posts

  • Get the User Name and Domain Name from an Email Address in SQL (950)
  • How to add default value for Entity Framework migrations for DateTime and Bool (859)
  • Get the First and Last Word from a String or Sentence in SQL (837)
  • How to select distinct rows in a datatable in C# (805)
  • How to make theater mode the default for Youtube (754)

Recent Posts

  • C#: Use Init-Only Setters for Immutable Objects After Construction
  • C#: Use Expression-Bodied Members for Concise Single-Line Methods
  • C#: Enable Nullable Reference Types to Eliminate Null Reference Exceptions
  • C#: Use Record Types for Immutable Data Objects
  • SQL: Use CTEs for Readable Complex Queries

Social

  • ErcanOPAK.com
  • GoodReads
  • LetterBoxD
  • Linkedin
  • The Blog
  • Twitter
© 2026 Bits of .NET | Built with Xblog Plus free WordPress theme by wpthemespace.com