CScope slow response

Post here any ideas/problems/suggestions you have regarding CodeLite's CScope plugin
bobcat
CodeLite Enthusiast
Posts: 11
Joined: Wed Aug 08, 2012 2:52 pm
Genuine User: Yes
IDE Question: c++
Contact:

CScope slow response

Post by bobcat »

Hello,

I use latest CodeLite 4.0.5589. The binary was downloaded from the official site. OS – Windows 7. (I used 3.5.x before and encountered the same problem).

When I use CScope, the responses for any request are very slowly. Since the project sources are placed on a server, I checked traffic between PC and the server. I run “Create CScope database” and then “CScope->Find this C symbol”. As I saw, all files were scanned (during “Find this C symbol”). Also, I saw that every request update files cscope.out and cscope_file.list. As far as I remember, CScope should use created database rather than scan files again and again.

What may be done to find and fix the problem?

Thanks in advance
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: CScope slow response

Post by eranif »

It seems that the option 'Update Db if stale' is causing the slowdown on my machine. disabling it - fixes the problem

You can disable it from the 'Cscope' tab from the "Output View"

Eran
Make sure you have read the HOW TO POST thread
bobcat
CodeLite Enthusiast
Posts: 11
Joined: Wed Aug 08, 2012 2:52 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: CScope slow response

Post by bobcat »

Hello Eran,

I tried the work-around and CScope really works fast now. But what is the source of the problem? If I am searching through the code, I am sure that nothing is changed. Why CodeLite (or CScope) does decide DB is stale? May it be connected to another problem that I observe: after Windows weak-up I have to run “Workspace->Retag Workspace (Full)”? Otherwise “Find Resource” (Ctrl-Shift-R) works slowly.

Thanks in advance
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: CScope slow response

Post by eranif »

bobcat wrote:after Windows weak-up I have to run “Workspace->Retag Workspace (Full)”? Otherwise “Find Resource” (Ctrl-Shift-R) works slowly.
I am not sure how its related. Anyways, I did not notice this slow down ( did you try restarting codelite ? )

It seems like that its cscope fault.. If the flag "Update Db if stale" is enabled, codelite will *not* pass the "-d" option to cscope, from the manpage:
-d
Do not update the cross-reference.
It seems that when the -d flag is not passed to cscope, its pretty slow...
I will change this behavior so that "-d" will be passed by default (i.e. the option "Update Db if stale" is disabled by default)

Eran
Make sure you have read the HOW TO POST thread
bobcat
CodeLite Enthusiast
Posts: 11
Joined: Wed Aug 08, 2012 2:52 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: CScope slow response

Post by bobcat »

Hi Eran,
eranif wrote:
bobcat wrote:after Windows weak-up I have to run “Workspace->Retag Workspace (Full)”? Otherwise “Find Resource” (Ctrl-Shift-R) works slowly.
I am not sure how its related. Anyways, I did not notice this slow down ( did you try restarting codelite ? )
Now I see that they are unrelated. I will try to learn more about the phenomenon and open separate topic for it once I have more information.
eranif wrote: It seems like that its cscope fault.. If the flag "Update Db if stale" is enabled, codelite will *not* pass the "-d" option to cscope, from the manpage:
-d
Do not update the cross-reference.
It seems that when the -d flag is not passed to cscope, its pretty slow...
I will change this behavior so that "-d" will be passed by default (i.e. the option "Update Db if stale" is disabled by default)

Eran
Thanks for support
Post Reply