T O P I C R E V I E W |
carnitron |
Posted - Jul 11 2006 : 1:33:39 PM When the cursor is in certain files, VAX causes the dev environment to lock out input for 10-20 seconds at a time. It then lets me type for 2-3 seconds before repeating the process. This makes the dev environment unusable on those files, so I have to disable/re-enable the tool when working with them.
At this point, I have strong suspicions that it is heavily templated code. This happens in files that we do serialization on, and we have a templated IO routine that works on a variety of data types. Like 400+ types. So, we have maybe 100+ IO calls in the file, each of which could match to lots of different types, some of which have their own specializations.
I'm guessing that VAX's parser spends lots of time parsing through this stuff over and over again as I type into the file. If it's easy for you guys to confirm this, that would be great. I'm trying to avoid spelunking through the mix of templates and macros to arrive at a definitive test case, since that could be time consuming.
Cheers, Peter Green
|
24 L A T E S T R E P L I E S (Newest First) |
sean |
Posted - Dec 19 2006 : 9:00:39 PM case=1971 is fixed in build 1543 |
carnitron |
Posted - Dec 07 2006 : 2:43:18 PM Feline, your workaround has made everyone happy again! We've confirmed multiple times that the grevious pauses go away once your StdAfx.h mods are in.
So, while I still hope you guys fix the actual bug, this resolves the issue for us.
Thanks greatly for your help!
Cheers, Peter Green |
feline |
Posted - Dec 06 2006 : 08:46:37 AM I hope so I may be able to offer some further advice on editing VA's StdAfx.h if you still get some problems, but to be honest once you get the idea the edits are fairly basic. |
carnitron |
Posted - Dec 05 2006 : 6:35:56 PM Zounds, now that I see what you are saying, I think this may be our workaround! So far the slowdowns appear to be gone, after I've put in a version of your change that applies to our project. Let me hang with it for a day or two to make sure I'm not seeing a false positive, but if this fixes us, you will make many people very happy. :)
Cheers, Peter Green |
feline |
Posted - Dec 01 2006 : 4:00:17 PM the file "C:\\Program Files\\Visual Assist X\\Misc\\StdAfx.h" is part of VA, not part of your solution. So VA will always use this file, regardless of the files in your solution.
No global macros that can be placed into this file is a problem.
We may be able to find a partial work around by placing an empty #define for the template function name into VA's StdAfx.h file. It is not an ideal solution, but if it works it is a good stop gap.
Do you follow my thinking here? If this code is not representative I cannot really make any sensible suggestions for what to insert, but this might work. |
carnitron |
Posted - Dec 01 2006 : 1:00:57 PM Ok, I'm back, sorry I wasn't able to reply earlier. Thanks, Feline, for following up on this.
While I definitely appreciate your suggestion here, it isn't actually helpful to our team. The example I sent you uses macros to generate lots of templates, and it is the templates that I think are causing the problem.
Our project does not actually use StdAfx.h, and even if it did, there are no macros to "pre-define" like this that might globally speed up our situation.
I'm hoping you can get an engineer there to use the example to understand why putting the cursor in a templated routine with 1000s of instantiations would lock the dev environment for a minute at a time.
Cheers, Peter Green
|
feline |
Posted - Nov 20 2006 : 4:15:03 PM Apologies for the long delay. We have quite a lot of outstanding bug reports, but things like this, bug fixes inside the parser, have to be approached gently, to make sure we don't break anything else.
Having said that, this is rather a long time. I will try and get someone to look at this. As a partial work around can you try the following. If you edit the file C:\\Program Files\\Visual Assist X\\Misc\\StdAfx.h and add the lines:
#define Test_
#define SpewBase_
#define SpewOrder01_
#define SpewOrder02_
#define SpewOrder03_
#define Spew_
at the bottom of the file, and then tell VA to rebuild its symbol databases:
VA Options -> Performance -> General -> Rebuild symbol database
this should help. I have tried this here, and while I am still getting a fairly high CPU use, it does seem a lot better. The StdAfx.h file is parsed before any other file, and can be used to address problem, or difficult code. You need to be aware that the installer ships a new copy of this file, so you need to reapply your changes after each upgrade to VA, and also any change to this file requires you rebuild your symbol database. |
carnitron |
Posted - Nov 20 2006 : 2:20:25 PM <Bump> Sure hoping you guys can figure this one out -- it's hitting pretty much everyone on our team that uses VAX...
Cheers, PCG |
rhummer |
Posted - Oct 10 2006 : 7:28:29 PM still no update from support on this, chasing this... |
carnitron |
Posted - Oct 10 2006 : 7:22:01 PM Ok guys, it's a day short of 3 months since this was reported. Any updates?
Cheers, Peter Green |
rhummer |
Posted - Sep 07 2006 : 2:59:50 PM No update on this, so I bumped the proprity of this abit. |
carnitron |
Posted - Sep 07 2006 : 2:18:31 PM Hey guys. Any word on this? What's the typical bug turnaround for Whole Tomato?
Cheers, Peter Green |
carnitron |
Posted - Aug 07 2006 : 12:26:07 PM Ok, cool, thanks for checking again Joe. I'm definitely keen to hear what you guys determine.
Cheers, PCG
P. S. I'm now running VAX in "super minimal" mode, with merely performance options and syntax coloring on (and easy access to your Open File dialog, which still remains one of the most brilliant bits of UI design ever :). The pauses are not nearly as bad, but it is sort of an interesting data point that they still happen in this situation, given that VAX should theoretically not be doing much.
|
jpizzi |
Posted - Aug 07 2006 : 12:14:14 AM I have both of those options turned on. I just tried it again, since you said it doesn't happen consistently, and I am seeing it. I notice that when I am doing this, the CPU is at 100% (not surprising). I disabled VA (via the menu only), and even though the CPU is at 100%, there is no delay.
case=1971
|
carnitron |
Posted - Aug 06 2006 : 7:00:10 PM Argh, that's both unexpected and unfortunate. Here's my About info from the VAX Options dialog:
VA_X.dll file version 10.3.1530.0 built 2006.07.08 VAOpsWin.dll version 1.3.3.4 VATE.dll version 1.0.5.7 DevEnv.exe version 8.0.50727.42 msenv.dll version 8.0.50727.42 Font: Courier New 12(Pixels) Comctl32.dll version 6.0.2900.2180 Windows XP 5.1 Build 2600 Service Pack 2 2 processors Platform: Win32 Stable Includes: C:\\Program Files\\Microsoft Visual Studio 8\\VC\\include; C:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\include; C:\\Program Files\\Microsoft Visual Studio 8\\VC\\PlatformSDK\\include; C:\\Program Files\\Microsoft Visual Studio 8\\SDK\\v2.0\\include;
Library Includes: C:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\src\\mfc; C:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\src\\mfcm; C:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\src\\atl; C:\\Program Files\\Microsoft Visual Studio 8\\VC\\crt\\src;
Other Includes: <blank>
Also, just to be sure, really monkey around in tmain with the templated tokens -- it happens in specific places but is not entirely consistent. I also got good pauses occuring by hitting enter before one of the <#>'s next to CTesterSub, and then hitting backspace repeatedly. The pauses are like 14-20 seconds in length on my box, using this example. (Though they can be much longer in our actual code base.) Can't imagine it's relevant, but we use spaces instead of tabs for whitespace.
Finally, one other key bit of info. The pauses do not appear to occur in the above usage case if I have both of the following options off:
Text Editor/Suggestions/Display Suggestion lists and acccept with Test Editor/Listboxes/Allow acronyms
This is not necessarily an exhaustive list, though - I did not turn every option on, but merely did a process of elimination on the ones I commonly work with. However, to make things extra exciting, turning these options off does not eliminate the pauses in our main code base. Even if I turn every option off in the product (including the performance-related ones), I still get pauses in our heavily templated routines.
Wish I had better news!
Cheers, PCG
|
jpizzi |
Posted - Aug 05 2006 : 6:47:39 PM I followed your instructions using VS 2005 Team Edition for Software Developers (let's hope that the specific flavor of VS is not relevent) and VAX 1530, and I do not get the extreme pauses you are describing. Is there something else that may be relevent? |
carnitron |
Posted - Aug 04 2006 : 12:27:58 PM Sorry for the delay, it has been rather busy over here. Anyway, finally got a chance last night to figure out a test case for you guys. It simulates the large number of templated routines that have sprung into existence over time in our code base (2500+ and counting).
To reproduce:
1. Create a Win32 console application called "VAX Test" in Dev Studio 2005. 2. Paste the included code into "VAX Test.cpp". 3. Move the cursor down to _tmain. 4. Hand type in an extra "uo.Test" line, such as:
uo.Test(CTesterSub<8>());
Note how there are extreme pauses once you get to the <>'s and ()'s. These pauses do not occur if VAX is disabled.
Please let me know when and if I can try out a fix, b/c the issue has become severe enough that I am now only keeping VAX on when I need to use its nifty file open dialog.
Cheers, PCG
. . .
// VAX Test.cpp : Defines the entry point for the console application. //
#include "stdafx.h" #include <iostream> using namespace std;
class CTester { public: virtual void Set (int v) = 0; };
template <int NSIZE> class CTesterSub : public CTester { public: virtual void Set (int v) { for (int i = 0; i < NSIZE; i++) data[i] = v;
cout << v << '\\n'; }
private: int data[NSIZE]; };
template <typename TTYPE> void Test (CTester& t, TTYPE& to) { t.Set(to.Get()); }
#define Test_(test, val) ::Test(test, val)
#define SpewBase_(x, y, z, n) \ CTesterSub<x * 1000 + y *100 + z * 10 + n + 1> var##x##y##z##n; \ class CTestObject##x##y##z##n { \ public: \ CTestObject##x##y##z##n () { \ Test_(var##x##y##z##n, *this); \ } \ int Get () { return x * 1000 + y *100 + z * 10 + n; } \ }
#define SpewOrder01_(x, y, z) \ SpewBase_(x, y, z, 0); \ SpewBase_(x, y, z, 1); \ SpewBase_(x, y, z, 2); \ SpewBase_(x, y, z, 3); \ SpewBase_(x, y, z, 4); \ SpewBase_(x, y, z, 5); \ SpewBase_(x, y, z, 6); \ SpewBase_(x, y, z, 7); \ SpewBase_(x, y, z, 8); \ SpewBase_(x, y, z, 9)
#define SpewOrder02_(x, y) \ SpewOrder01_(x, y, 0); \ SpewOrder01_(x, y, 1); \ SpewOrder01_(x, y, 2); \ SpewOrder01_(x, y, 3); \ SpewOrder01_(x, y, 4); \ SpewOrder01_(x, y, 5); \ SpewOrder01_(x, y, 6); \ SpewOrder01_(x, y, 7); \ SpewOrder01_(x, y, 8); \ SpewOrder01_(x, y, 9)
#define SpewOrder03_(x) \ SpewOrder02_(x, 0); \ SpewOrder02_(x, 1); \ SpewOrder02_(x, 2); \ SpewOrder02_(x, 3); \ SpewOrder02_(x, 4); \ SpewOrder02_(x, 5); \ SpewOrder02_(x, 6); \ SpewOrder02_(x, 7); \ SpewOrder02_(x, 8); \ SpewOrder02_(x, 9)
#define Spew_() \ SpewOrder03_(0); \ SpewOrder03_(1); \ SpewOrder03_(2); \ SpewOrder03_(3)
Spew_();
class CUserObj { public: template <typename TEST> void Test (TEST& test) { Test_(test, CTestObject3001()); Test_(test, CTestObject3002()); Test_(test, CTestObject3003()); Test_(test, CTestObject3004()); Test_(test, CTestObject3005()); Test_(test, CTestObject3006()); Test_(test, CTestObject3007()); } };
int _tmain(int argc, _TCHAR* argv[]) { CUserObj uo; uo.Test(CTesterSub<1>()); uo.Test(CTesterSub<2>()); uo.Test(CTesterSub<3>()); uo.Test(CTesterSub<4>()); uo.Test(CTesterSub<5>()); uo.Test(CTesterSub<6>()); uo.Test(CTesterSub<7>());
return 0; }
|
feline |
Posted - Jul 22 2006 : 4:32:25 PM carnitron could you post a couple of code snippets? i keep re-reading your description, and i still do not have a good mental model of what is going on here.
Dean, apart from the happy feeling of bringing an 8 CPU machine to its knees this is a little worrying. do you have time to check out your CPU usage level? or more simply does the whole machine slow right down, or is it only the IDE? |
Dean Ashton |
Posted - Jul 18 2006 : 11:33:04 AM Just so carnitron isn't left all on his own, I thought I'd speak up to say I've been experiencing the same slowdowns. When I disable VAX it all returns to normal (although, strangely, it takes around 5 or 10 seconds to do so.. maybe VAX takes a little while to shut things down). This is on an 8 CPU machine (dual dual xeons, with hyperthreading). Build 1530..
I've yet to determine what is causing it to go tits up.. hence no proper bug report from me. Also v.busy.. :(
Dean |
carnitron |
Posted - Jul 17 2006 : 3:19:59 PM Usually 20 or less, but after some more fiddling, it appears that even 1 is enough to cause the pause. I think the best approach to trying to dup the problem on your end would be to: A) Create a simple templated routine and then instantiate the heck out of it with UserType001, UserTyp002 ... UserType400 etc. B) Call it once inside another (possibly templated) routine and see what VAX does when you put the cursor in the containing routine. |
feline |
Posted - Jul 16 2006 : 3:50:08 PM when you say there are lots of them can you give me some sense of scope? are you talking 20 of them? 200 of them? 15,000 of them? |
carnitron |
Posted - Jul 13 2006 : 7:11:01 PM Shoot, I spoke too soon (maybe it doesn't occur while you get the VAX parsing messages in the status bar?) Anyway, still happens in 1530. Some more details:
1. At this point, I think it is related to having one of the "bad" routines on screen and having that screen have the focus (i.e. cursor is in it, or you are scrolling, etc.). I am able to work in the file as long as the "bad" routine is not on screen. Presumably this is b/c syntax coloring needs to parse them? Regardless, putting the cursor in the routine or modifying the routine causes the behavior to kick in.
2. "Bad" routines look sorta like this:
template <typename TFOO> void FOO (TFOO& foo, CBlah& val, char* str) {
FOO_(foo, val.m_a); FOO_(foo, val.m_b);
// Lots of these... }
Where the FOO_ macro looks like this:
#define FOO_(foo, x) ::FOO(foo, x, #x)
and ::FOO is the templated global IO routine.
Hopefully this helps!
Cheers, Peter Green |
carnitron |
Posted - Jul 13 2006 : 6:08:02 PM Woohoo! This solves the problem, thank goodness. Much apprecated.
Cheers, Peter Green |
support |
Posted - Jul 11 2006 : 8:21:14 PM Can you try the latest 15xx build?
http://www.wholetomato.com/forum/forum.asp?FORUM_ID=18 |
|
|