Author |
Topic |
|
cbranch
Senior Member
USA
30 Posts |
Posted - Jul 14 2008 : 1:19:59 PM
|
Ver: 1645, VS2003 WinXP
A heads up, I'm noting that when dealing w/ code that uses boost signals & bind, frequently the editor will freeze up for a few seconds while typing. It clearly has some problems with boost templates + macros.
Frequently typing: boost::bind( Is sufficient to make it freeze for a few seconds. As always after input several valid lines of C++ code revisiting these lines (without editing) does not cause any freeze.
1645 installed clean, default options (problem exists w/o additional plugins).
I have added a couple macros to StdAfx which makes boost parse a little better. So far just: #define BOOST_BIND bind
As many boost features will be part of C++0x it would be great if VAX could take steps to improve it's support. |
Colin Branch |
|
cbranch
Senior Member
USA
30 Posts |
Posted - Jul 14 2008 : 4:20:37 PM
|
After further investigation and two more full complete uninstall /reinstall cycles and can share a little more info.
When bringing up any class that had signals as members would freeze initially. It no longer does this, however I don't know why uninstall/reinstall has any affect (it only stopped happening after the third clean install).
However there is certainly a problem with the bind function. It completely freezes for multiple seconds when typing any signature side it, or simply moving the cursor between the parentheses. I've also had the IDE completely lock up (after 12 min it hadn't returned, CPU was maxed and memory was not changing).
Any ideas on how to improve the behavior specifically for bind would be welcome. |
Colin Branch |
|
|
feline
Whole Tomato Software
United Kingdom
18991 Posts |
Posted - Jul 15 2008 : 1:36:25 PM
|
Assume I don't know anything about boost::bind, what do I need to know to setup a basic test?
I have boost 1.33.1 installed and the IDE knows about boost. using VS2005 and VA 1645 I have just added the following code to a cpp file:
#include "boost/bind.hpp"
static void testGeneralCode()
{
boost::bind()
}
I guessed at the #include line, but since "bind" is underlined as a mistyped symbol it is probably the wrong #include. I am not seeing any delay or CPU usage spike when typing this call to bind, or when moving the caret through the code. |
zen is the art of being at one with the two'ness |
|
|
cbranch
Senior Member
USA
30 Posts |
Posted - Jul 17 2008 : 4:17:16 PM
|
I'm sorry I should have mentioned I'm using Boost 1.34.1
I typed the exact same thing you provided and I get a 5s (according to the windows clock) freeze after I type the '(' following bind. |
Colin Branch |
|
|
feline
Whole Tomato Software
United Kingdom
18991 Posts |
Posted - Jul 18 2008 : 10:11:12 AM
|
I am not seeing any problems with Boost 1.34.1 either. I have added:
C:\\boost\\boost_1_34_1;
To VS2005's list of C++ include directories, so it is picked up for VA's stable include directory list. I have also rebuild VA's symbol database to make sure that has updated its self from Boost 1.33.1 to 1.34.1
Can you try this test code in a new default solution please? I am wondering if something else in your main solution is a factor. |
zen is the art of being at one with the two'ness |
|
|
cbranch
Senior Member
USA
30 Posts |
Posted - Jul 24 2008 : 3:17:26 PM
|
Well in a completely empty project I'm not seeing the same effect. Our project isn't that small 1200 files ~150,000 LOC and of course a ton of dependencies so it's certainly difficult to track down the problem. I can say that the problem was definitely introduced in the new version of VAX but of course what is causing will be difficult to track down if you can't reproduce it. |
Colin Branch |
|
|
feline
Whole Tomato Software
United Kingdom
18991 Posts |
Posted - Jul 25 2008 : 12:56:45 PM
|
If you add a new empty cpp file to your main project do you see the problem in this file? I am wondering if simply being part of the project is a problem, or if the problem might be related to one of the #include statements in your normal code files. |
zen is the art of being at one with the two'ness |
|
|
cbranch
Senior Member
USA
30 Posts |
Posted - Jul 27 2008 : 4:46:26 PM
|
Yes the problem exists when I create a new blank file and type the below replication code. There is no difference in time between an empty file and one that includes other files. (This appears to be true in general as the size of VAX's symbol database is causing slow down). This seems to be generally true about VAX's overall performance.
For example, it takes about 20 seconds after creating a new implementation for a function (via the refactor menu) before VAX's intellisense pics up the new function's scope and thus the symbols when typing code in it (an explicit save directly after does speed it up a little). There is no freeze but typing gives no suggestions. With an empty project there is no apparent delay.
Because in other cases the behavior is delayed but does not freeze the editor, makes me think the problem with bind is a 'exceptional' case as it's not just a slow lookup. |
Colin Branch |
|
|
feline
Whole Tomato Software
United Kingdom
18991 Posts |
Posted - Jul 28 2008 : 10:21:01 AM
|
Something strange is going on here. Just considering the Create Implementation effect for a moment, in a large test solution (9,000 files) I created a new CPP file and added the following code:
class testCreateImpSuggestMembers
{
private:
int m_nSuggestOne;
int m_nSuggestTwo;
public:
void createMe();
};
I then used Create Implementation on the member function, and I was immediately able to type and have the member variables suggested by VA. No need for a 20 second delay. This is using VS2005 and VA 1646.
Plus you are not seeing the boost delay in a new solution.
Lets look at Create Implementation first, this might be easier to make sense of. Can you try the same test I did please, and see what results you get? |
zen is the art of being at one with the two'ness |
|
|
cbranch
Senior Member
USA
30 Posts |
Posted - Jul 29 2008 : 12:55:13 PM
|
I should mention that it's really up to 20 seconds as that is the worse case. I don't think it has anything to do with CPU usage. But it might have to do with virtual memory paging, or disk access, and thus maybe not really a problem with VAX.
Specifically for the code you provided it takes about 3-4s when done exactly like that.
When I place it into our namespace it adds a few more seconds. My low fidelity timings are 7s, 4s, 8s, 2s (after that it appeared fairly consistently 2-4s). It was only 'instant' once that that is when I deleted the code, and then retyped it without ever saving the files (which makes me think the database was never updated and obviously not a real world scenario).
We do namespaces like this:
//Header namespace Foo { class Bar{...}; }
//Source namespace Foo { Bar::Bar() {} }
VAX properly puts the function into the namespace but there does seem to be a couple issues with namespaces, I'm about to post another bug which has existed for a long time with create declaration & namespaces.
|
Colin Branch |
|
|
feline
Whole Tomato Software
United Kingdom
18991 Posts |
Posted - Jul 30 2008 : 09:17:51 AM
|
The size and complexity of the file with have some effect here, since VA has to reparse the file to know what is going on. 3-4 seconds sounds more reasonable to me. VA has to decide that you have stopped typing before it is going to reparse the entire file, which is one factor to consider.
Going back to boost for now, do you still have your test project where you do not see the delay?
Can you compare the IDE setting:
Project properties -> C/C++ -> General -> Additional Include Directories
For the two solutions please? Since the boost problem shows up in an empty file in your main solution I am assuming the problem is either caused by a library your main solution uses, or by something defined inside your main solution. Library directories are often referenced via this IDE setting. |
zen is the art of being at one with the two'ness |
|
|
cbranch
Senior Member
USA
30 Posts |
Posted - Aug 04 2008 : 2:39:04 PM
|
Hi, unfortunately at this point I've done the work around since boost bind is used frequently enough through out of code base that I just need to get past this issue.
The work around is to add the following to the stdafx.h file. namespace boost { void bind(...); }
Now since basically boost bind's signature isn't useful anyway it's not a loss of any sort of detail.
I can tell you that for projects with only boost & our header directory it did appear to still happen but right now I've got too much to do to get playing around with VAX. I don't believe we have anything that has bind in our headers so I don't think there is something obvious that could be causing this.
Should I find anything in the future I'll be sure to post it. Thanks |
Colin Branch |
|
|
|
Topic |
|