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: Use Mouse Without Borders to Control Multiple PCs with One Keyboard/Mouse

Windows 11: Use Storage Sense to Auto-Delete Temporary Files

Windows 11: Keeping Your PC Awake with Microsoft PowerToys

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 *

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 (858)
  • Get the First and Last Word from a String or Sentence in SQL (836)
  • 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 (447)

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 (858)
  • Get the First and Last Word from a String or Sentence in SQL (836)
  • 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