Power Save Mode and external file watcher indexing behavior in IntelliJ IDEA
0 reputation · 13 Nov 2020, 12:24 UTC
0 reputation · 13 Nov 2020, 12:24 UTC
The goal is to clarify whether enabling Power Save Mode in IntelliJ IDEA truly suspends file system watchers for externally modified files, and how this interacts with the configurable "Suspend indexing when file is not modified for X minutes" setting.
Current documentation states that Power Save Mode reduces CPU usage by disabling background inspections and indexing, but it does not specify if the IDE continues to monitor the file system for changes outside the project. Users have observed occasional UI lag in large projects despite the mode being active, suggesting that some indexing tasks may still be triggered. The exact boundary between what is suspended and what remains active is therefore undefined.
Does Power Save Mode keep file system watchers active for externally modified files? Does the "Suspend indexing when file is not modified for X minutes" setting apply when Power Save Mode is enabled? Are there conditions under which indexing of external dependencies still occurs despite Power Save Mode being turned on?
Power Save Mode in IntelliJ IDEA does not completely kill the file system watcher, but it significantly alters how the IDE responds to external changes. While the IDE may still detect that a file has changed on disk, it suspends the automatic background indexing and real-time analysis that typically follow such an event.
The "Suspend indexing when file is not modified for X minutes" setting is designed to prevent CPU spikes during massive external operations (like a git checkout or a build script). When Power Save Mode is active, it takes precedence over standard background indexing triggers. Consequently, the IDE will generally not initiate a full index update of externally modified files, regardless of the specific timeout settings, until the mode is disabled or a manual refresh is triggered.
If you experience UI lag while Power Save Mode is enabled, it is likely not caused by full project indexing, but by one of the following remaining active processes:
To confirm how your specific project version is behaving, use this scoped test:
Diagnostic Note: To provide a more precise answer regarding the lag, please specify if you are using a network-mapped drive (NFS/SMB) or a Docker-mounted volume, as these use different polling mechanisms than local SSDs.
Use comments to ask for clarification. Post a solution as an answer.
6,550 reputation · 13 Nov 2020, 17:04 UTC
When Power Save Mode is enabled, IntelliJ IDEA does not shut down the operating‑system file‑watcher that monitors the project directory. The watcher remains active so that the IDE still sees when a file is added, removed, or modified outside the editor.
However, the IDE changes the way it reacts to those events:
File → Synchronize is performed.The "Suspend indexing when file is not modified for X minutes" timeout is only considered for changes that originate from the IDE itself (e.g., edits made in the editor). External changes detected by the watcher bypass this timeout and still trigger incremental indexing, even while Power Save Mode is active.
To verify the behavior on your own installation, check the IDE log for lines containing Indexing started after you modify a file with an external editor while Power Save Mode is on. The presence of such entries confirms that incremental indexing is still occurring.