Performance: best way to structure the project

Hey all,

I am trying to optimize our project in Intellij. We have a huge code base that is split into modules. Within each module we have submodules for the test classes. So the structure looks like

|-- java

So the question I have is since we have submodules, In intellij we add them as top level modules. However I am unsure if Intellij is smart enough while indexing to realise that the submodules under test dont need to be indexed twice and whether it knows to exclude the target under the test?

I have tried to exclude the test folder from the parent module but this causes intellij to add the module outside the project on its own. Do we need to do this to prevent the test modules target from being indexed?

Thanks in advance!

Comment actions Permalink

All files/modules are indexed only once. Output folders are not indexed by default. If target folder is configured as output, it will not be indexed.

Comment actions Permalink

Thanks Serge, Just want to clearify, Our output directories are excluded in the module. However would the parent module index the child modules target if the partent does not exclude it (If I look in the project structure, the parent module excludes its own target folder but does not mark test/unit/target as excluded but the unit module does mark it as excluded.) The reason I ask is It seems like it is indexing the test modules target even though the test module excludes it. My only guess is because the parent does not exclude it so it is being added to index.


Please sign in to leave a comment.