User forums > Using Code::Blocks

Time used to open a file

<< < (7/10) > >>

Jenna:

--- Quote from: vbspam on May 07, 2011, 08:17:19 am ---Hi
I posted another thread about very similar topic here http://forums.codeblocks.org/index.php/topic,14644.0.html .
I have got there response with link to this thread. On the first view it looks like it is the same problem I experiencing however I think that you are fighting another one.
If I understand correctly, this thread is beating the slow opening of project with already opened files (reopening those previously opened files in the editor). I am fighting the problem of opening  new project and/or creating new project with many files. Please correct me if I am wrong.

By the way I disabled and then removed all plugins (by removing them from the disk) and it had no influence to the loading speed. I think that the reason is that plugins do not come to the scope at the time of creating of the virtual folder's tree.

An on the end I can contribute to fighting your problem. From my experience the big speed up comes when you disable automatic completion update (what is probably done every keypress) and instead of this let it be updated every "file save". This can be set somewhere in editor settings.

--- End quote ---

I already have read your other post and will try to look into it.
I use the linux-kernel sources as test project (just to load it, not to compile or anything).

If I have the code-completion plugin removed, it does not change anything when opening a great amount of files.
On linux (debian 64-bit gnome 3) there are two slowdowns: for great files it's the styling of the editor (probably fixed by the patch) and the labeling of the notebook (hopefully also fixed).
But I did not yet test on windows.
Speed-up should be much less there (because at least the labeling is already much faster on windows, than on linux [wxWidgets ?]).

Jenna:

--- Quote from: jens on May 07, 2011, 09:00:03 am ---I already have read your other post and will try to look into it.
I use the linux-kernel sources as test project (just to load it, not to compile or anything).

--- End quote ---

Here comes a patch, that replaces wxList with a wxHashSet for the ProjectFile*-list, what leads to a more or less great amount of changes.
The patch is not deeply tested and nottested on windows at all.
It's mixed with the other patch, described earlier in this thread.

I used the linux-kernel 2.6.35 as test project, no files opened, just loading the project and filling the treectrl in management pane.
CC-plugin is disabled, because it sometimes eats up all of my memeory and makes the system nearly unusable.

Overall load-time with trunk (from closing the starthere-page until selecting the active build-target):
1 m 30.846 s
with my changes:
0 m 11.398 s

in other words:
about 8 times faster

closing is much faster with trunk (at the moment):
2.255 s
and with my patch:
5.465 s
about 2.4 times slower

exact values (snippets from debug log with DisplayEvents-plugin):


--- Code: ---wxHashSet (codecompletion disabled)

open linux-kernel 2.6.35


23:50:31,744  =>  cbEVT_EDITOR_CLOSE
Loading project file...
Parsing project file...
23:50:32,141  =>  cbEVT_PROJECT_RENAMED
23:50:32,149  =>  cbEVT_BUILDTARGET_ADDED
23:50:32,149  =>  cbEVT_PROJECT_TARGETS_MODIFIED
Loading target Debug
23:50:32,150  =>  cbEVT_BUILDTARGET_ADDED
23:50:32,150  =>  cbEVT_PROJECT_TARGETS_MODIFIED
Loading target Release
Loading project files...
23:50:32,175  =>  cbEVT_PROJECT_BEGIN_ADD_FILES
23:50:35,732  =>  cbEVT_PROJECT_END_ADD_FILES
33115 files loaded
Done loading project in 3991ms
Project's base path: /home/jens/kernel-tmp.2.6.35/
Project's common toplevel path: /home/jens/kernel-tmp.2.6.35/
23:50:39,498  =>  cbEVT_PROJECT_OPEN
23:50:39,499  =>  cbEVT_WORKSPACE_CHANGED
23:50:43,138  =>  cbEVT_PROJECT_ACTIVATE
23:50:43,142  =>  cbEVT_BUILDTARGET_SELECTED

and close it

Removed test from all deps
23:53:53,051  =>  cbEVT_EDITOR_SWITCHED
23:53:53,138  =>  cbEVT_EDITOR_ACTIVATED
23:53:53,259  =>  cbEVT_PROJECT_CLOSE
23:53:58,248  =>  cbEVT_BUILDTARGET_SELECTED
23:53:58,289  =>  cbEVT_WORKSPACE_CHANGED
23:53:58,431  =>  cbEVT_APP_ACTIVATED
23:53:58,447  =>  cbEVT_EDITOR_SWITCHED
23:53:58,516  =>  cbEVT_EDITOR_ACTIVATED

trunk

open

23:55:21,116  =>  cbEVT_EDITOR_CLOSE
Loading project file...
Parsing project file...
23:55:21,345  =>  cbEVT_PROJECT_RENAMED
23:55:21,354  =>  cbEVT_BUILDTARGET_ADDED
23:55:21,355  =>  cbEVT_PROJECT_TARGETS_MODIFIED
Loading target Debug
23:55:21,355  =>  cbEVT_BUILDTARGET_ADDED
23:55:21,355  =>  cbEVT_PROJECT_TARGETS_MODIFIED
Loading target Release
Loading project files...
23:55:21,379  =>  cbEVT_PROJECT_BEGIN_ADD_FILES
23:56:43,454  =>  cbEVT_PROJECT_END_ADD_FILES
33115 files loaded
Done loading project in 82341ms
Project's base path: /home/jens/kernel-tmp.2.6.35/
Project's common toplevel path: /home/jens/kernel-tmp.2.6.35/
23:56:47,745  =>  cbEVT_PROJECT_OPEN
23:56:47,746  =>  cbEVT_WORKSPACE_CHANGED
23:56:51,936  =>  cbEVT_PROJECT_ACTIVATE
23:56:51,962  =>  cbEVT_BUILDTARGET_SELECTED

and close it

Removed test from all deps
23:58:36,742  =>  cbEVT_EDITOR_SWITCHED
23:58:36,762  =>  cbEVT_EDITOR_ACTIVATED
23:58:36,876  =>  cbEVT_PROJECT_CLOSE
23:58:38,597  =>  cbEVT_BUILDTARGET_SELECTED
23:58:38,671  =>  cbEVT_WORKSPACE_CHANGED
23:58:38,886  =>  cbEVT_APP_ACTIVATED
23:58:38,906  =>  cbEVT_EDITOR_SWITCHED
23:58:38,997  =>  cbEVT_EDITOR_ACTIVATED

--- End code ---

As mentioned not deeply tested (might break some stuff), so be careful.
Make a backup of your project to be secure .

EDIT:
patch updated, see: http://forums.codeblocks.org/index.php/topic,14543.msg103572.html#msg103572

Folco:
Have these patches been applied ?
I think that now, the time spent to open a project is significantly lower, am I right ?

Jenna:
Updated wxHashSet-patch (against svn r7546).

MortenMacFly:
...for all those that cannot apply this version of the patch, try the one attached. It is the same (just another format, and the files got re-ordered).

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version