User forums > Using Code::Blocks

Time used to open a file

<< < (4/10) > >>

Jenna:
Because it also litters the sources.

To find a call that needs more time than others, I have debug statements before and after nearly any call.
There are of couse some general debug-statements, but they are in the sources already.

If I remmebr correctly they slipped in accidently (by MortenMacFly as svn blame [unreliable at the moment] tells me).
They come from one of my patches and use "fileload_measuring" (all lowercase).

Jenna:
I found one more reason, that can slow down load speed for large projects (if multiple files get opened):
We use SetPageText to set the the tab-title in SetProjectFile (we can notreliable set the title earlier, because we need the path relative to the projects basepath, depending on the tab-title options).
I looked into the wxWidgets sources, and found that every call does a Refresh() and an Update() of the notebook.
I copied the function into our cbAuiNotebook class and added a parameter to allow (or forbid) the calls to Refresh() and Update(), because they don't make sense while loading the project.
With this change and the movement from SetLanguage int SetEditorStylesAfterFileOpen the load time decreased about 40 to 50 % for my two test projects (200 files web-project and C::B core) with all files opened on startup.

It's not (yet) tested on windows.

Please test and give feedback.

With fileload_measuring defined, you get the overall load time (the time used by cbProject::LoadLayout() ) printed into C::B's debug log.

mandrav:

--- Quote from: jens on April 22, 2011, 12:08:30 am ---Please test and give feedback.

--- End quote ---

Works good for me Jens, nice work :)

MortenMacFly:

--- Quote from: jens on April 22, 2011, 12:08:30 am ---It's not (yet) tested on windows.

--- End quote ---
I can't try for the moment (I am on holiday ;-)). Did Yiannis try on Windows?!

Jenna:

--- Quote from: MortenMacFly on April 23, 2011, 06:08:34 pm ---
--- Quote from: jens on April 22, 2011, 12:08:30 am ---It's not (yet) tested on windows.

--- End quote ---
I can't try for the moment (I am on holiday ;-)).
--- End quote ---
I'm at home but the children are in holiday (except my youngest daughter), nearly as good.

--- Quote from: MortenMacFly on April 23, 2011, 06:08:34 pm ---Did Yiannis try on Windows?!

--- End quote ---
I tried in the meantime and it also works, but without this great improvement.

I did not dig into it deeper, but I guess wxWidgets on windows (or windows itself ?) does not do a real refresh/update for hidden notebooks, but wxWidgets on linux seems to do so.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version