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
Windows

Hidden Setting That Fixes Random App Freezes

- 25.01.26 | 15.02.26 - ErcanOPAK

The Mystery: You have a beast of a machine—32GB of RAM, a high-end CPU—yet your IDE (Visual Studio, IntelliJ) or your browser randomly freezes for 2-3 seconds. You check the Task Manager, and you see “System” process spiking your CPU. What gives?

The Culprit: A hidden Windows feature called Memory Compression. While it’s great for low-end laptops with 4GB of RAM, on a development machine, it’s a performance killer. It compresses data in your RAM to save space, but every time you switch tabs, your CPU has to decompress that data, causing those annoying micro-stutters.


The Performance Boost: Disable Memory Compression

If you have 16GB of RAM or more, you don’t need Windows to compress your memory. You want raw, uncompressed speed. Here is how to disable the “MMAgent” compression feature via PowerShell.

Step 1: Right-click the Start button and select Terminal (Admin) or PowerShell (Admin).

Step 2: Run the following command to kill the compression:

# Disable Memory Compression
Disable-MMAgent -MemoryCompression

Step 3: Restart your computer to clear the existing compressed swap in your RAM.


🔍 Why This Matters for Developers

Memory compression creates CPU Spikes. When you are compiling code, running Docker, and having 50 Chrome tabs open, your CPU is already busy. Adding “Compression/Decompression” cycles on top of that leads to:

  • High DPC Latency: Audio crackling or mouse lag.
  • IDE Freezes: Delay when switching between code files.
  • Docker Sluggishness: Slower I/O operations in virtualized environments.

How to Revert (If needed)

If you ever find yourself on a low-RAM machine and need to turn it back on, simply run:

Enable-MMAgent -MemoryCompression

Pro Tip: You can check your current status by running Get-MMAgent. If “MemoryCompression” is False, you are in the fast lane!

Related posts:

Windows 11 “Alt-Tab Lag” — The Explorer Restart Trick

Clipboard History (Win + V)

Power Plans Still Exist (And They Still Matter)

Post Views: 22

Post navigation

Turn Complex Topics into Clear Mental Models
Why SSDs Slow Down Over Time (And How to Prevent It)

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

March 2026
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
3031  
« Feb    

Most Viewed Posts

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

Recent Posts

  • C#: Saving Memory with yield return (Lazy Streams)
  • C#: Why Records are Better Than Classes for Data DTOs
  • C#: Creating Strings Without Memory Pressure with String.Create
  • SQL: Protecting Sensitive Data with Dynamic Data Masking
  • SQL: Writing Readable Queries with Common Table Expressions (CTE)
  • .NET Core: Handling Errors Gracefully with Middleware
  • .NET Core: Mastering Service Lifetimes (A Visual Guide)
  • Git: Surgical Stashing – Don’t Save Everything!
  • Git: Writing Commits That Your Future Self Won’t Hate
  • Ajax: Improving Perceived Speed with Skeleton Screens

Most Viewed Posts

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

Recent Posts

  • C#: Saving Memory with yield return (Lazy Streams)
  • C#: Why Records are Better Than Classes for Data DTOs
  • C#: Creating Strings Without Memory Pressure with String.Create
  • SQL: Protecting Sensitive Data with Dynamic Data Masking
  • SQL: Writing Readable Queries with Common Table Expressions (CTE)

Social

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