dprint / dprint-intellij

A dprint plugin for Intellij.
https://plugins.jetbrains.com/plugin/18192-dprint
MIT License
12 stars 2 forks source link

Fix performance issue where stderr reader was not blocking. #35

Closed ryan-rushton closed 2 years ago

ryan-rushton commented 2 years ago

Overview

I missed something I should have removed after testing the weird IntelliJ behaviour in the last release. Basically, I had a thread running that was never blocking so it would eat up a whole process. This fixes that so that the stderr reader for the editor service blocks waiting for input, this will ensure the thread is only run when there is something to read.

I have also made a change to ensure the can format cache is cleared and repopulated after a restart.