Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Catastrophic performance when editing
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

kernel_panic
New Member

France
6 Posts

Posted - Jun 11 2013 :  12:02:09 PM  Show Profile  Reply with Quote
Hello and sorry for this heaty topic name. ;)

My workstation is a Xeon E5-2630 featuring 32 GB of RAM and RAID 1 SSDs and generally when I do CPU heavy tasks such as G?editing textG? the machine somehow manages to do it.

Lately my editing speed in VS 2012 is becoming crazy slow. Now, the project IG??m working on isnG??t massively big, itG??s template intensive for sure, but IG??d say we are within the range of couple of hundreds of files and about twenty projects.

IG??ve updated to version 1940 and this doesnG??t change anything.

When I say massively slow, I mean, I get a freeze of several seconds when I add semi colon after a new typedef or I wait a similar amount of type for Visual Assist to add a closing brace to a new structure.

IG??ve disabled my antivirus and it didnG??t change anything. When I disable VA I donG??t have the problem anymore.

IG??ve turned on the log and I get tons of lines such as:

quote:
WARN: FindFDS: concat def len(5352) cnt(0) :()


It seems to be chocking on some of my template metaprogramming:

quote:
GetBaseClassList 3 :boost:mpl:integral_c
comparison_type variant 0
WARN: TU1: skip recursion for :boost:mpl:integral_c using boost.mpl.integral_c


During the freeze, CPU usage gets pretty high (one core seems to be used up).

Is this a bug? Is there anything I should do?

Thanks a lot for any input.

Edited by - kernel_panic on Jun 11 2013 12:03:03 PM

feline
Whole Tomato Software

United Kingdom
18951 Posts

Posted - Jun 11 2013 :  3:52:45 PM  Show Profile  Reply with Quote
Definitely a bug. VA can slow down editing in large files, but even then not this much. By large I mean 22,000 lines. Are any of your code files large?

Having a single core max out suggests this is VA's parser getting stuck.

Can you please turn on VA logging, reproduce the problem, and send me the log file, as explained here:

http://docs.wholetomato.com?W305

Hopefully this will offer some clues.

If you open a single code file on its own, not as part of your solution, do you still see this problem? If so, would it be possible to get a copy of the code file for testing purposes? I appreciate this is often not possible, but its worth asking on the off chance.

Please submit the files via the form:

http://www.wholetomato.com/support/contact.asp

including this thread ID or URL in the description, so we can match it up.


zen is the art of being at one with the two'ness
Go to Top of Page

kernel_panic
New Member

France
6 Posts

Posted - Jun 11 2013 :  4:32:26 PM  Show Profile  Reply with Quote
Thanks for the quick answer!

quote:
Originally posted by feline

Definitely a bug. VA can slow down editing in large files, but even then not this much. By large I mean 22,000 lines. Are any of your code files large?



The file in question is 304 lines long. Most of the files are short, however, there is a catch: because it's meta programming the actual parsed code is much larger.

quote:
Originally posted by feline
Can you please turn on VA logging, reproduce the problem, and send me the log file, as explained here:

http://docs.wholetomato.com?W305

Hopefully this will offer some clues.



Will do!

quote:
Originally posted by feline
If you open a single code file on its own, not as part of your solution, do you still see this problem? If so, would it be possible to get a copy of the code file for testing purposes? I appreciate this is often not possible, but its worth asking on the off chance.



It's possible to send the file itself, and I will, but alone I fear it might not be very useful.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18951 Posts

Posted - Jun 12 2013 :  12:08:58 PM  Show Profile  Reply with Quote
These are very small files. I have seen heavy macro or template code cause parser problems before, but thankfully this is rare, and normally happened in larger files.

If I can reproduce the terrible performance with just one file then I will be able to run some tests, to see if I can speed things up a bit. VA has its own StdAfx.h file that is used to help our parser understand complex code, so adding some helper entries to this file may help, perhaps even help a lot, but I need to be able to reproduce the problem before testing this idea.

This FAQ entry explains the StdAfx.h file:

http://docs.wholetomato.com?W302

and my first attempt will be to add lines like:

#define COMPLEX_MACRO_ONE(x) x
#define COMPLEX_MACRO_TWO


to "hide" the most troublesome items from VA. Its a bit crude, but it can be surprisingly effective

zen is the art of being at one with the two'ness
Go to Top of Page

kernel_panic
New Member

France
6 Posts

Posted - Jun 13 2013 :  03:18:32 AM  Show Profile  Reply with Quote
I think if you play a little bit with the Boost.Fusion macros you might be able to reproduce the problem.

http://www.boost.org/doc/libs/1_53_0/libs/fusion/doc/html/fusion/adapted/define_struct.html


Edited by - kernel_panic on Jun 13 2013 05:22:06 AM
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Jun 14 2013 :  6:44:27 PM  Show Profile  Reply with Quote
We got the files, thank you. I have replied to your email.
Go to Top of Page

foxmuldr
Tomato Guru

USA
402 Posts

Posted - Jun 18 2013 :  08:51:22 AM  Show Profile  Reply with Quote
I have seen similar issues with VAX 1929 in Windows Server 2003 SP2, Visual Studio 2008 SP1 running in Oracle VirtualBox VM (4.2.12 r84980).

I've observed that if I continue to develop for a couple hours, then VAX gets slower and slower, eventually to the point where it can't keep up with me typing and lags behind several characters.

Sometimes exiting the instance of the IDE and restarting fixes it. Not always. The only fix I found that always works (found by accident) is to:

(1) Get out of all instances of the IDE,
(2) Go to the OS version equivalent of: "C:\\Documents and Settings\\User\\Local Settings\\Application Data\\VisualAssist\\"
(3) Delete all the vs9* directories
(4) Restart the IDE.

Doing this, it's good to go for a few more hours. :-)

Note: The project I've seen this in is the libsf\\vvm\\core\\vvm.sln solution in (https://github.com/RickCHodgin/libsf). This project has in total over 35,000 lines of source code, and I typically have about 15 separate files open during development.

Best regards,
Rick C. Hodgin

Edited by - foxmuldr on Jun 18 2013 08:53:52 AM
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Jun 18 2013 :  12:36:07 PM  Show Profile  Reply with Quote
foxmuldr: is there any chance that you can save out a minidump file of a hang? I mean, are they long enough to do that?

http://docs.wholetomato.com?W303

Anyway, deleting the mentioned files is the same as pressing the following button:
VA Options -> Performance -> Rebuild

(It might be a tiny little bit easier to do.)
Go to Top of Page

foxmuldr
Tomato Guru

USA
402 Posts

Posted - Jun 18 2013 :  1:45:49 PM  Show Profile  Reply with Quote
quote:
Originally posted by accord

foxmuldr: is there any chance that you can save out a minidump file of a hang? I mean, are they long enough to do that?


It never really hangs. Just keeps getting slower and slower. If I can do anything to help would be happy to. If you have a special debug-enabled version of VAX for me to install, I can press the keyboard shortcut to have your app record whatever metrics might be helpful.

FWIW, I type pretty fast, but I would estimate it's not processing the characters at even 40 wpm at its slowest. It's also slow everywhere. On comments, source code lines. And it does slow down even more when it's trying to find something for auto-complete. Since I'm running inside a VM I've never truly ruled out it isn't a side-effect of running the VM for that long, though I don't see the slowdown in other apps I run, just Visual Studio 2008.



On an unrelated note, I've also seen some other odd behavior not related to the slowness at all. Every now and again, and for no apparent reason, a line of source code the caret's on will suddenly be completely replaced with a repeating character that has no bearing on how long the original line of source code was (the displayed repeated character can be shorter, can be longer). It persists whether I move off the line, back on to the line, type something, select it all, or whatever. It just shows up as a single character of whatever it is (not a letter, but looks like a square with a tiny arrow-head at some point), and it remains for about 15 seconds no matter what I do, then returns to normal. No idea why that happens. Doesn't happen too often. Sporadically. Once a week or so at most. It doesn't affect anything. 15 seconds later everything's back to normal. Still freaks me out though. :-)
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Jun 19 2013 :  11:38:42 AM  Show Profile  Reply with Quote
foxmuldr: Can you please try disabling VA temporarily just to see if it makes any difference?

VA Options -> Enable / Disable Visual Assist X

The same goes for the strange characters. Next time it happens, can you please try disabling VA temporarily to see if the problem stops existing? (I mean immediately vs. the 15 sec you are currently experiencing)

When this slowdown happens, does the whole system slow down or just VS or just the typing speed is reduced? I'm wondering whether it is caused by an excessive memory leak or not.

Regarding how to debug a problem like this: it's never easy, but one possible solution is to turn on Visual Assist logging to see if they will contain useful information about the slowdown:
http://docs.wholetomato.com?W305

Please submit the files via the form:
http://www.wholetomato.com/support/contact.asp

including this thread URL in the description, so we can match it up.
Go to Top of Page

foxmuldr
Tomato Guru

USA
402 Posts

Posted - Jun 19 2013 :  3:24:55 PM  Show Profile  Reply with Quote
quote:
Originally posted by accord

foxmuldr: Can you please try disabling VA temporarily just to see if it makes any difference? The same goes for the strange characters.


Will try.


quote:
When this slowdown happens, does the whole system slow down or just VS or just the typing speed is reduced?


Just VS.


quote:
Regarding how to debug a problem like this: it's never easy, but one possible solution is to turn on Visual Assist logging to see if they will contain useful information about the slowdown:
http://docs.wholetomato.com?W305

Please submit the files via the form:
http://www.wholetomato.com/support/contact.asp

including this thread URL in the description, so we can match it up.



Will do.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Jun 20 2013 :  5:27:10 PM  Show Profile  Reply with Quote
quote:
Just VS.


Just the editor, or other non-related things as well? (opening files, walking through the VS options dialog, etc.)
Go to Top of Page

foxmuldr
Tomato Guru

USA
402 Posts

Posted - Jun 21 2013 :  10:16:39 AM  Show Profile  Reply with Quote
quote:
Originally posted by accord

quote:
Just VS.


Just the editor, or other non-related things as well? (opening files, walking through the VS options dialog, etc.)




Just the editor. But I haven't really paid that much attention. I know when it goes slow, it still compiles fine. I am able to switch between tabs fine. Everything else seems to work. Just when I type it goes super super slow.

I will pay more attention and note it next time.
Go to Top of Page

foxmuldr
Tomato Guru

USA
402 Posts

Posted - Jun 22 2013 :  03:35:16 AM  Show Profile  Reply with Quote
I think I've figured out some aspect of this. I use a VM that's running at a 1920x1200 screen size in the guest. There are times I run it full-screen on the host using my 1920x1200 monitor. Other times I run it windowed (on my laptop, or just smaller on the 1920x1200 monitor) where it has to scale. It seems like when it's scaled it begins to slow down over time. And I guess I don't observe it anywhere other than the editor window because it's still updating at a rate of something like 40wpm, which is fast enough to do all other graphics operations fast enough to be nearly immediate.

I coded tonight for several hours full-screen and I never observed the slowdown.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18951 Posts

Posted - Jun 24 2013 :  6:46:47 PM  Show Profile  Reply with Quote
What VM software are you using? I use VMware workstation a lot, and I have never seen it scale the virtual machine when the size of the window changes. Perhaps I have just never turned this setting on, I was not aware it was even an option.

I have my machines either set to keep the same resolution regardless, or to update the resolution in the virtual machine when the host window size changes. I am wondering if setting your VM to behave the same, if possible, would fix this problem.

zen is the art of being at one with the two'ness
Go to Top of Page

foxmuldr
Tomato Guru

USA
402 Posts

Posted - Jun 24 2013 :  7:54:20 PM  Show Profile  Reply with Quote
quote:
Originally posted by feline

What VM software are you using?


Oracle's VirtualBox. I use it because it's open source.

quote:
I use VMware workstation a lot, and I have never seen it scale the virtual machine when the size of the window changes. Perhaps I have just never turned this setting on, I was not aware it was even an option.


VBox will run vmdk files if you want to try it out. Just create a new machine, and then use the existing disk (or a copy of the disk) and it should launch identically. You may need to uninstall the VMWare add-ons, and then install the VBox add-ons, or boot into safe mode the first time.

quote:
I have my machines either set to keep the same resolution regardless, or to update the resolution in the virtual machine when the host window size changes. I am wondering if setting your VM to behave the same, if possible, would fix this problem.


The issue is when I am working on my Visual FreePro project, I have a lot of windows open. I use the 1920x1200 to maximize screen real-estate. However, I can't always work on it at my desk. My laptop has a 1600x900 resolution, which it scales down to nicely as I can still see everything well enough to be completely usable. And there are times when I want to scale it down even on my desktop because I have a chat window up, or am watching a video alongside, etc. Various reasons.

Try VirtualBox. It's the only Oracle product I suggest trying, by the way. LOL! :-)

One note: Do not enable 3D mode if you also plan to use scaling. There is a bug since 4.2.4 that they haven't fixed yet which prevents the screen from updating properly. See the https://www.virtualbox.org/ticket/11364.

Edited by - foxmuldr on Jun 25 2013 09:45:41 AM
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Jun 26 2013 :  5:44:43 PM  Show Profile  Reply with Quote
I'm using VirtualBox and will look into this. What version of VirtualBox are you exactly using?
I'm still on 4.1, there was a bug with 4.2.x long ago, so I downgraded and didn't upgraded since. So I'll do that while I will be investigating this.

Edited by - accord on Jun 26 2013 5:46:03 PM
Go to Top of Page

foxmuldr
Tomato Guru

USA
402 Posts

Posted - Jun 26 2013 :  7:21:23 PM  Show Profile  Reply with Quote
Am running 4.2.14 r86644. I switched to 4.2.x with 4.2.2, and it worked without issue for what I was using. I ran it on Linux and Windows with both Windows and Linux guests. Right now, I typically only run Windows Server 2003 guest on Linux Mint 14 hosts.

Scale mode is Host+C (typically Right-ctrl+C). Then use Host+F to go back into full-screen mode.

I've found that scaling 1920x1200 down to 1600x900 is still readable. Much smaller than that and it gets a little hard, unless you increase the sizes of your fonts. :-)

Edited by - foxmuldr on Jun 26 2013 7:26:03 PM
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Jul 11 2013 :  09:52:32 AM  Show Profile  Reply with Quote
Sorry for the delay getting back to you.
I have upgraded my VirualBox to the latest (4.2.16, it should behave similarly) I am not seeing any obvious problem here, but if it happens after hours of work on a large project, it will be hard to reproduce. Do you see any obvious immediate problem or just after a couple of hours?

Based on the past days' experience, are you still able to avoid slowdown using full screen mode?
Are you seeing any difference between full-screen and Windowed but not scale modes? In Windowed mode (with scaling disabled) Visual Studio and Windows is scaled, so you would be able to work without the slowdown, in theory?

If you are still experiencing the problem, can you please try turning on logging, reproduce the problem and send the log files in?
http://docs.wholetomato.com?W305

They may give us a clue about why is this happening.
You can send the logs in using this form:
http://www.wholetomato.com/support/contact.asp

Please paste the URL of this topic into the description field, so we can match it up.
Go to Top of Page

foxmuldr
Tomato Guru

USA
402 Posts

Posted - Jul 11 2013 :  10:13:46 AM  Show Profile  Reply with Quote
quote:
Originally posted by accord
Do you see any obvious immediate problem or just after a couple of hours?


Nope. And even back then it didn't happen all the time. Could be a million causes or something native to VS2008 itself.

quote:
Based on the past days' experience, are you still able to avoid slowdown using full screen mode? Are you seeing any difference between full-screen and Windowed but not scale modes? In Windowed mode (with scaling disabled) Visual Studio and Windows is scaled, so you would be able to work without the slowdown, in theory?


I have been using it in scaled mode, but not for lengthy sessions as before. I have in my mind to keep an eye on it. I have some desktop recording software so if it starts happening I'll record it so you can see it.

quote:
If you are still experiencing the problem, can you please try turning on logging, reproduce the problem and send the log files in?
http://docs.wholetomato.com?W305

They may give us a clue about why is this happening.
You can send the logs in using this form:
http://www.wholetomato.com/support/contact.asp

Please paste the URL of this topic into the description field, so we can match it up.



Will do. Thank you for all your assistance.

Edited by - foxmuldr on Jul 11 2013 10:14:25 AM
Go to Top of Page

foxmuldr
Tomato Guru

USA
402 Posts

Posted - Mar 09 2014 :  12:41:49 PM  Show Profile  Reply with Quote
I have figured out the cause of the increasing slowdown. It is the size of the undo buffer. If I exit Visual Studio 2008 from time to time when the slowdown begins, it goes away. I have observed I only see the slowdown when doing a lot of refactoring, or a lot of editing.

I discovered this by making a massive change recently, and then it immediately began being very slow. So, I put two-and-two together and came up with 22. :-)
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000