User forums > Using Code::Blocks
Forrtran - Add Files Recursively is Slow
FEA:
Great detective work guys! Now that I know the specific issue, I can work around it.
It was really concerning since the command line limit length resolution appeared to also take a very long time via the script from BlueHazzard (twice the time to read the files). So even if BlueHazzard made the patch, Code::Blocks would probably not be practical.
Anyway, now that it has been identified and there is a workaround, I am really looking forward to BlueHazzard's patch. That seems to be the last piece of the puzzle.
Thanks again!
darmar:
I updated FortranProject plugin. Changes in r294.
Thanks to oBFusCATed for showing where is the problem.
Just a note: my self I could not repeat the problem. Even adding >700 files with >500k lines of code it took ~10-20s. A new version takes now shorter.
oBFusCATed:
The project provided by the user has this behaviour without the fortran plugin:
--- Code: ---ProjectManager::AddMultipleFilesToProject took: 0.115 seconds for 1873 files.
--- End code ---
And with fortran plugin:
--- Code: ---ProjectManager::AddMultipleFilesToProject took: 1.845 seconds for 1873 files.
--- End code ---
This same problem seems to happen if you do remove files from project. FortranProject::OnProjectFileRemoved seems to be really expensive.
oBFusCATed:
Here is a flamegraph for the add with the fixed version: https://imgur.com/a/IkWLMzx
@darmar: It seems that you're parsing every file on at the moment it is added. I suppose it is better just to schedule the file for parsing and do this in another thread or onidle.
FEA:
Looks like things are on the right track. For 1873 files, I had 10 minutes, 40 minutes, and 60 minutes on 3 different computers. When disabling the Symbols Browser, it took about 5 seconds on the fastest computer.
On the fastest computer, it takes about a minute to read in 600 files (so not dramatically different from Darmar). The issue is that it seems to be exponential and 1900 files takes about 10X that of 600 files. It seems to really show on slower laptops.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version