Im trying to do some work in an old / long lived p...
# android-studio
z
Im trying to do some work in an old / long lived project (10+ years) with roughly 300 modules. Practically everything code related in the IDE is very very slow and ramps my CPU usage to 100%. New projects, even larger ones, work just fine. Any ideas?
k
Working on older projects is a pain. I would just update all the gradle stuff. That should improve performance
z
Agreed, Im already using the latest gradle release though! Same across all of my projects, so I know it can be fast, it just isnt for my old project for some reason 🤷🏽‍♂️
k
When I've gone back to really old projects, it usually ends up being easier to start a new project and slowly add the files back in
z
Well, hope I dont need to do that 😄 There is a lot of code in those modules
k
No need to recreate, just copy/paste from the system but do it in small batches to make sure everything works
z
I get the feeling that if I do that, it will take me a very long time to do; and my code will only start compiling when enough pieces of the puzzle are back together - at which point Im not sure it will have made any difference.
I have refactored the codebase a few times over those 10 years, last being just a few years back. Its up-to-date in that sense.
What would I be looking for if I were to "recreate" the project as you mentioned?
k
So, I've had projects that were so out of date that I needed to have the IDE recreate all of the gradle files with the latest versions with a new project. Trying to manually update all the project files is too hard. The other way to do it is to create a new project and just replace all the gradle files of the old project with the new ones from the new project
z
Been there too! This project worked perfectly fine only a few months back, which makes me think that the problem is probably not that big. Im just out of ideas on what it might be and the IDE logs dont show anything weird.
It works perfectly fine this morning. I wish I could pinpoint what did the trick, Ive just been working in other projects for the past few days - coming back to this and it just works 🤷🏽‍♂️ Same IDE versions, etc.