The Road to Responsive IntelliJ-Based IDEs
8 hours ago
- #JetBrains
- #IDE Development
- #UI Performance
- JetBrains is improving UI responsiveness in IntelliJ-based IDEs by moving performance-sensitive work off the UI thread to reduce write lock time.
- The IntelliJ Platform uses a single read-write lock that prevents simultaneous read and write actions, causing freezes when the UI thread waits for locks.
- Background write actions were developed to shift write actions off the UI thread, starting in 2019 but paused due to complexity and resumed in 2022.
- A new cancelable lock was created in collaboration with JetBrains Research to support background writes, replacing the old lock that assumed writes only on the UI thread.
- Modality-aware locking was introduced to handle modal dialogs and prevent deadlocks when running background write actions during modal interactions.
- Compatibility mechanisms were implemented to migrate listeners incrementally, such as in VFS refresh, allowing plugin code to run on the UI thread if needed.
- Efforts to reduce lock acquisition on the UI thread include relaxing lock requirements in the editor and delaying asynchronous computations to avoid blocking.
- Results show a reduction in UI time spent on write actions, from 1.8276% in 2025.2 to 0.5298% in 2025.3, with ongoing work to further eliminate locking.