What's New in IntelliJ Elixir 10.0.1
Beach Balls to Background Tasks
In version 10.0.0, the new automatic dependency management made setting up Libraries and Modules easy, but for large projects, it was also slow enough to cause the dreaded beach ball on macOS.
To address this, the algorithm has been rewritten from a depth first recursive resolution to an iterative work queue. This is possible because, except for
path dependencies, all the dependencies are known immediately by looking under
deps. The work queue ensures that IntelliJ Elixir 10.0.1 does not have to walk a dependency more than once if it is an indirect dependency of cousin branches in dependency tree.
I improved the performance so much that I need to use the debugger to pause the UI to get this screenshot
Using tasks to run work in the background isn’t just a good idea in Elixir, it also works in JetBrain’s OpenAPI. Like how Task.async in Elixir runs a function in separate process, ProgressManager.run in OpenAPI runs a Task in either a foreground or background thread. Importantly, the Tasks in OpenAPI support taking a ProgressIndicator when they run. This means that the Task can:
- Report its progress, which makes the UI feel more responsive.
- Check if it’s canceled, so if does take too long, you can cancel the task and work-around the issue, manually managing your deps still, allowing for graceful degrading of the feature.
As 10.0.1 fixes a potential UI freeze, it is recommended that all users of 10.0.0 upgrade to 10.0.1.
You can install IntelliJ Elixir v10.0.0 from inside any of the support JetBrains IDEs. I recommend using IntelliJ IDEA (Community or Ultimate) edition if you’re using umbrella projects, as only it can support the new multi-module project features.
DockYard is a digital product agency offering exceptional user experience, design, full stack engineering, web app development, software, Ember, Elixir, and Phoenix services, consulting, and training.