User forums > Using Code::Blocks
Non-blocking CC
(1/1)
mirai:
Current code completion implementation in CB blocks editor until it finds a solution. Sometimes it can disable CB editor for unacceptably long time. Is it possible to implement asynchronous non-blocking CC in low priority thread different from code editor thread? Besides, I think it would be OK to stop CC after defined time (a couple of seconds) if it didn't find a solution, because slow [and blocking] CC is almost as good as if it wasn't there in the first place.
Usually CC takes a long time to figure out things like this (the last line):
--- Code: ---class A
{
public:
A& x(/*args*/) { /*code*/ return *this; }
A& y(/*args*/) { /*code*/ return *this; }
A& z(/*args*/) { /*code*/ return *this; }
};
A a;
a.x().y().y().y().z().x().y().y().z();
--- End code ---
oBFusCATed:
Probably it could be done.
But you're breaking a rule/principle for good OOP design, don't remember what exactly it was :)
So, this turn out as a feature of C::B's CC, not a bug :lol: :P (I'm joking of course)
Have you tried to lower the number of result you can have in the auto-completion list box?
The default is pretty high and if your query is too generic filling the list will be the most expensive operation.
mirai:
--- Quote from: oBFusCATed on April 08, 2011, 06:02:06 pm ---Have you tried to lower the number of result you can have in the auto-completion list box?
The default is pretty high and if your query is too generic filling the list will be the most expensive operation.
--- End quote ---
Thanks for the hint, it helped. Lower limit value made CC work time bearable.
ptDev:
--- Quote from: mirai on April 08, 2011, 08:35:34 pm ---
--- Quote from: oBFusCATed on April 08, 2011, 06:02:06 pm ---Have you tried to lower the number of result you can have in the auto-completion list box?
The default is pretty high and if your query is too generic filling the list will be the most expensive operation.
--- End quote ---
Thanks for the hint, it helped. Lower limit value made CC work time bearable.
--- End quote ---
I think the default value could be lowered to 8192 or a similar number, and most users would not notice any difference (except for the improved responsiveness).
oBFusCATed:
I use 500 or something like that and when typing wx in C::B's project it is feeling slow :(
Navigation
[0] Message Index
Go to full version