Author Topic: Projects with many files - very slow project opening/creating  (Read 4903 times)

Offline vbspam

  • Single posting newcomer
  • *
  • Posts: 2
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?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7785
    • My Best Post
Re: Projects with many files - very slow project opening/creating
« Reply #1 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.
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Projects with many files - very slow project opening/creating
« Reply #2 on: May 10, 2011, 12:33:27 am »
See here for an experimental patch.