Author Topic: changes between r7459 and r7460 slow down project load  (Read 13476 times)

Offline cbnewbie

  • Multiple posting newcomer
  • *
  • Posts: 25
Re: changes between r7459 and r7460 slow down project load
« Reply #15 on: October 31, 2011, 08:30:14 am »
@ oBFusCATed
As you can see in my previously attached file cb_log.txt there are two things happening:

1. Loading the first project in the workspace takes a lot of time while the other projects are loaded faster.
2. The overall performance of loading is slow.

But I am lucky that all projects have the same common top level path (see previously attached cb_log_2.txt). That is why the remaining projects are loaded faster. A really bad situation happens if you have projects with different top level paths and - even worse - if at least one project has the top level path "/". The last case will result in a whole system scan/traverse every time you open this project.


@ all:
Is it really necessary to scan all directories below the common top level path? Wouldn't it be enough to scan all directories below the actual workspace path? I do not miss any functionality if I simply undo the changes from version r4760 where traversing via directories was introduced.

If traversing the top level directory is really necessary for some functionality of c::b which I do not use (and therefore don't miss) can't there be an project option to traverse either the workspace directory or the top level directory?

Is it at all necessary to traverse the top level directory every time you open a project?


@ jens:
I will try your new patch today.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: changes between r7459 and r7460 slow down project load
« Reply #16 on: October 31, 2011, 09:11:40 am »
@ all:
Is it really necessary to scan all directories below the common top level path? Wouldn't it be enough to scan all directories below the actual workspace path? I do not miss any functionality if I simply undo the changes from version r4760 where traversing via directories was introduced.
I have introduced it, because projects where the project-file is somewhere in the folder-structure of the projects where broken.
I did not introduce the ProjectDirTraverser, I just fixed this issue with it.
See
If traversing the top level directory is really necessary for some functionality of c::b which I do not use (and therefore don't miss) can't there be an project option to traverse either the workspace directory or the top level directory?

Is it at all necessary to traverse the top level directory every time you open a project?
Calculating the toplevel path has to be done every time a project is opened, or a file is added/deleted, because the project might be changed from other user, from C::B or even manually or it might have moved on the drive or to a different drive.
Projects can be shared by many people via revision control system, like C::B's projects.
And there are surely more cases, where a recalculating is needed.

But if I am correct the traverser is not needed in any of these cases.

See the http://forums.codeblocks.org/index.php/topic,15430.msg103592.html#msg103592.

Please make further discussion about calculating the common toplevel path there.

Direct answers to questions in this thread should stay here I think.