sbt / sbt-projectmatrix

MIT License
123 stars 14 forks source link

Plugin becomes very heavy with large projects #68

Open borissmidt opened 3 years ago

borissmidt commented 3 years ago

Dear,

It seems that this plugin becomes super heavy for projects with 50+ modules, the key references grows per scala version added to the project.

Maybe there are some plugins i could cut but it seems that i have to fall back to the vanilla cross compilation or i can't import the project anymore.

eed3si9n commented 3 years ago

or i can't import the project anymore.

Could you clarify what you meant here? Are you saying that IDE import becomes too slow to be usable? If so which IDE is it?

borissmidt commented 3 years ago

I'm using intellij, The heaviness i'm talking about is that i already need a 3GB of ram to import a project with 120 projects and this plugin enabled to compile fo scala 2.12, 2.13, 3

The only extra plugin i have enabled is the sbt.protoc plugin.

I'll spend some time to take a heapdump to find what consumes all the memory.

borissmidt commented 3 years ago

I've made a heapdump and it is mainly Scopes. So i think the project just became exponentially too big with this plugin. I.e. i had to cross build between 3 scala versions for 100 projects. Where the basic project with normal crossbuild configuration already uses 95068 settings keys.

Maybe it would be a good idea to dynamically calculate the settings keys for each scala version. But this would probably be slow and not fitting the sbt model.