Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: vbspam on May 06, 2011, 02:10:26 pm

Title: Projects with many files - very slow project opening/creating
Post by: vbspam on May 06, 2011, 02:10:26 pm
Hi guys

I am experiencing very slow opening (or creating) of projects containing large number of source files.
The slowdown is visible in projects with about 3000 files however I have project with 18000 source files and at this point the CodeBlocks becomes unusable for me. When I speak about slow I mean delay (program is not responding) for more than 5 minutes. In case of 18k+ files it is more than 60minutes. The funny fact is that after I wait this period CodeBlocks works reasonably fast and can be used even on linux.

I did some investigation and found that the problem is in the periodical call of the function wxListBase::Find [(wxwindows)src/common/list.cpp] .
This function is called by Find [projectfile.h] from function ProjectFile::AddBuildTarget [projectfile.cpp].

The problem I see there is that the "find" function implementation is doing simple linear search with == comparsion. As it is used periodically for each file being added to the project tree, it consumes all available CPU time and results in horrible delay.

First I thought that the problem is in my .cbp file (what is generated by cmake) however the adding files to the project has very similar behaviour.

So back to my question: Is there somebody who is experiencing similar problems? If so did you find any workaround or solution?
And finally question to CodeBlocks developers: Don't you see a way how this could be improved?
Title: Re: Projects with many files - very slow project opening/creating
Post by: stahta01 on May 06, 2011, 04:23:16 pm
Please read http://forums.codeblocks.org/index.php/topic,14543.15.html
I think it is the same problem; not sure they have the same cause found. Tim S.
Title: Re: Projects with many files - very slow project opening/creating
Post by: Jenna on May 10, 2011, 12:33:27 am
See here (http://forums.codeblocks.org/index.php/topic,14543.msg98512.html#msg98512) for an experimental patch.