IntelliJ IDEA 2017.2 EAP Introduces Unloaded Modules

Andrey Cheptsov

Another week of work for us—something new for you to try: have a look at the fresh IntelliJ IDEA 2017.2 EAP build. In addition to bugfixes, it introduces a new, experimental feature called Unloaded Modules.

This feature is supposed to help you to deal with large codebases by giving you the ability to select what modules you are going to work on in your project. Modules that you are not working with at the moment are marked as Unloaded and IntelliJ IDEA will not index or otherwise touch any files in these modules, which can help to conserve CPU and memory resources.

To access the feature, invoke the Project tree context menu and select Load/Unload Modules:

And now you just select the modules you’d like to work with at the moment.:

If a module you marked as loaded depends on other modules, IntelliJ IDEA will prompt you to load them as well:

When you’re about to refactor something, or are looking for usages of a symbol, you will be warned about the fact that there are unloaded modules that depend on the modules with which you are working, and therefore might contain code that should have been affected by the action, but won’t be:

It’s important to understand that when you exclude a module, consistency of changes in code that belongs to it will not be guaranteed, so be cautious when using this feature.

Even though this feature is openly available, it’s still under development, so please share your feedback, including bug reports in our issue tracker.

Develop with Pleasure!

Comments below can no longer be edited.

23 Responses to IntelliJ IDEA 2017.2 EAP Introduces Unloaded Modules

  1. Carsten Otto says:

    June 14, 2017

    I don’t understand the advantage. First, you say the unloaded modules are not indexed. Then, you describe how refactoring still has knowledge about the unloaded modules, because they were/are indexed. Would active indexing happen to loaded modules, which are just sitting there untouched?

    • Paul Chesnais says:

      June 15, 2017

      The biggest advantage I see here, and it’s why I’m excited about this feature, is when you hop between classes by name. If your codebase is sectioned into modules that each contain similarly or identically named classes (e.g. each module is an adapter for an API or a database), then it quickly becomes tedious to search by name when you’re working on a single adapter.

    • Mark Derricutt says:

      June 15, 2017

      I suspect this is does by tracking the module dependencies in the .iml module definition files, it doesn’t need to maintain an index for that knowledge..

      The advantage for me is not loading and watching 40+ modules when i’m often only working on 3-4 at a given time. And if I AM working on them, often some are on one topic branch, whilst others are on a different set.

      What could be neat is tracking sets of loaded/unloaded modules based on active changeset or something.

      Having a lower working memory footprint would be nice.

      • Nikolay Chashnikov says:

        June 19, 2017

        Yes, Mark is right. As you may see on the screenshot, the message say that there *may be* usages in the unloaded modules. IDEA doesn’t index content of unloaded modules but it knows which loaded modules they depend on.

  2. some dude says:

    June 15, 2017

    When are we getting “native” hassle free gradle-script-kotlin support in intellij?

    • Ilya Chernikov says:

      June 16, 2017

      The gradle-script-kotlin support is a part of the Kotlin plugin. We are working on it and plan to release an improved, as much hassle-free as possible, support in one of the next releases of Kotlin.

  3. Mark Derricutt says:

    June 15, 2017

    Love the idea – can’t wait to try it out. One thing that immediately comes to mind is a warning that a module contains changed files based on VCS. Which would imply some external process has changed the file, and maybe you actually want it loaded…

  4. Martin Zdarsky-Jones says:

    June 17, 2017

    I love the sound of this.
    What happens when I have 10 unloaded modules and 2 loaded. Those loaded depends on those unloaded.
    Will I be able to extend class for the unloaded (parent module), for example?
    Will I be able to navigate to the super class which sits in the unloaded module?

    It would be super cool if those unloaded modules would have at least one indexing done and assume that developers won’t work on them.

    • Martin Zdarsky-Jones says:

      June 17, 2017

      will there be an SKD API for this feature? Can we suppress the warning through API?

      • Nikolay Chashnikov says:

        June 19, 2017

        There is an API to load/unload modules (it’s marked as experimental for now though), but it isn’t possible to suppress the warning via API. Why do you want this?

    • Nikolay Chashnikov says:

      June 19, 2017

      Martin, if a class from loaded module depends on a class from unloaded module such reference will be shown as red and compilation will fail, because IDE doesn’t look into unloaded modules and doesn’t include them into compilation classpath. That’s why ‘Load/Unload Modules’ dialog suggest to unload all dependent modules when you unload a module.

      It seems that you want to mark some modules as read-only, not to unload them completely. It can be useful indeed, but it’s a different feature, and it’s much harder to implement. (It’s not enough to index such modules once, because their content may be changed when you update from VCS for example.)

      • Martin Jones says:

        June 21, 2017

        Yes, indeed. I’d like “read only” modules. Perhaps a feature for 2017.3? 🙂
        Typical hybris projects have 60-90modules which will never be modified by developers. We call it out-of-the-box modules which work as a base for the platform. Projects then customise the platform by adding new modules which inherit from those OOTB.
        90 modules is not a small number from performance point of view.
        I have tried to “hack” IDEA and pass compiled sources as libraries but it’s not ideal solution. read-only feature would be ideal.

        • Stefan Maler says:

          September 14, 2017

          These modules should be dependencies. Why have them in the code base when they are part of the framework? Is this really typical for hybris development (gives me the impression SAP does not know how to use Java which is an important information for risk assessment when deciding whether to incorporate Hybris or stay with classical SAP solutions for a while longer)

  5. Marten Deinum says:

    June 20, 2017

    Sounds like a great feature. I’m writing a book and have loads of modules with code samples. Now I can load only the modules for the sections I’m working on.

    I ran into a glitch (I guess) I have nested structure and when trying to load a top-level project (i.e. a whole chapter) it doesn’t work, I have to go inside the project and select the individual source sets and add those one by one. Quite cumbersome.

    • Nikolay Chashnikov says:

      June 20, 2017

      Could you please file a issue in our tracker, attach your project configuration files (*.iml files and .idea directory) and specify which modules you’re trying to unload?

  6. Michael Gellenthin says:

    June 20, 2017

    In every release of this eap I can’t use xdebug for debugging php-projects. I already get an error “com.intellij.ide.browsers.BrowserLauncherImpl$checkCreatedProcess$1 cannot be cast to java.lang.Runnable”. Is this issue is already known? With my Idea 2017.1.4 the same project works fine…?

  7. Anton Arhipov says:

    June 21, 2017

    Finally! The feature waited for 6 years to be implemented 🙂 However, why the dedicated modal dialog to load/unload modules? Extra item in the context menu makes the long menu even longer, plus the accessibility isn’t coherent with the way we are used to managed module related settings. Why couldn’t be part of the modules dialog where we already have all the controls to managed the settings related to modules?

  8. Ryan Proud says:

    August 4, 2017

    Would it be possible to “unload” run configurations tied to the unloaded modules as well? Unloading modules kind of leaves any dependent configs in a broken state.

    • Nikolay Chashnikov says:

      August 7, 2017

      Probably it makes sense to hide or somehow visually mark run configuration depending on unloaded modules. Feel free to create an issue about that in our tracker (

  9. wibrst says:

    August 23, 2017

    I find a status about load/unload modules function that can’t back. That is happening while I unload all android module at a android,
    I can’t find any menu item about load/unload modules function at the Project tree context menu.
    Finally, I resolve this trouble by add a new module,then the menu item is appear again!
    So, I think this is a bug.

  10. What’s Next for Mobile at Airbnb – SRE says:

    June 19, 2018

    […] of indirection enables engineers to build and develop on a thin slice of the app. That paired with IntelliJ module unloading dramatically improves build and IDE performance on a MacBook […]

  11. What’s Next for Mobile at Airbnb – Airbnb Engineering & Data Science – Medium - Engineering News says:

    June 21, 2018

    […] of indirection enables engineers to build and develop on a thin slice of the app. That paired with IntelliJ module unloading dramatically improves build and IDE performance on a MacBook […]

  12. Steven Spungin says:

    November 1, 2018

    This feature will also hide files from the excluded modules in the ‘local changes’ version control.

    Also, the excluded modules will still show up in the project tree and decorated as excluded. The contents can be ‘hidden’, but not the root modules.

    IMO the excluded modules should be put inside an excluded modules root node to tidy things up.


Subscribe for updates