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
 "Find References" and "Refactor/Rename"
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

andriy.tylychko
New Member

4 Posts

Posted - Jul 19 2018 :  10:38:29 AM  Show Profile  Reply with Quote
I'm working with Unreal Engine 4, quite a big sourcebase. Whenever I use "Find References" feature it blocks entire VS until it completes (makes it unresponsive, I suspect it executes the search synchronously from the main thread, this can take a while in UE4). It would be great to make it async. Often what I'm looking for is found pretty quickly but I still have to wait until it completes looking over entire sourcebase. This makes the feature almost unusable in projects of this size.

Another (remotely similar) issue is "Code generation and refactoring/Rename" feature - it can take a while to find all references and it even has "Stop" button, which doesn't work as it still unblocks only after finishing the search. Less of a problem though if compared with "Find References"

VS2017 v.15.7.4
VAX v.10.9.2270

Edited by - andriy.tylychko on Jul 19 2018 10:40:24 AM

feline
Whole Tomato Software

United Kingdom
18749 Posts

Posted - Jul 20 2018 :  06:56:50 AM  Show Profile  Reply with Quote
Is the IDE title bar being updated with "not responding" when this blocking happens? Find References will slow down the IDE a bit, since VA is going to be busy, but the IDE should still work and respond normally while VA is doing the find.

Are you able to do anything at all in the IDE while Find References is running? I have just triggered a Find References in an Unreal Engine project, and I can still move around the code normally. I have used Alt-O, Alt-Shift-O, Page Up, Page Down, scrolling and Alt-m list without any problems.

Does the Stop button in the Find References Results window work for you? It should, and it works for me.

Do you need to find across all projects, including the Unreal Engine source code? Or just your own code? If you don't need to search across the Engine its self, once the current find has finished, try turning Off the toolbar button:

Display references from all projects

this will tell VA to only run the find across the current project, which should speed things up, since it will limit the amount of code to scan.

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

andriy.tylychko
New Member

4 Posts

Posted - Jul 23 2018 :  05:57:01 AM  Show Profile  Reply with Quote
thanks for reply. I was suspecting that something is wrong with my installation as the problem is too obvious on any big source code. I just checked with my colleagues and it works fine for them. Would be great to find out what's the issue is in my case.

No, IDE title bar doesn't say "not responding", but it is actually not responding, looks like UI thread is blocked. Nothing works, including "Stop" button in "Find References" window. It doesn't matter how I trigger "Find References", by shortkey or menu. And it takes ~ 10 secs. I do need to find across all projects by default.

So it's what I do:
My VS is open over two monitors, 2 source files side-by-side on the main and lots of tools windows docked together on another, e.g. Solution Explorer, Output, VA Find References Results etc. I click on any symbol in source file view and trigger "Find References" (usually by shortkey), VA Find References Results clears out and starts to show progress bars and entire VS is frozen.
Go to Top of Page

Zeblote
Tomato Guru

183 Posts

Posted - Jul 23 2018 :  09:10:44 AM  Show Profile  Reply with Quote
The exact same thing is happening for me - find references and rename completely blocks the ui until the progress bar finishes. The stop button is not clickable. The code can't be interacted with while it runs either.

It's fairly fast so it never occured to me it wasn't supposed to be this way...
Using latest VS 2017 and VA (like always)

Edited by - Zeblote on Jul 23 2018 09:12:09 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18749 Posts

Posted - Jul 23 2018 :  09:19:38 AM  Show Profile  Reply with Quote
Interesting, and we now know it is not machine specific. I wonder if you have the same trigger for this problem, or different triggers.

Which OS are you both using? It should not matter, but since I don't know what the problem is, lets check everything.

My first guess is either a problem setting, or a conflict with another installed extension. Can both of you please close all instances of the IDE, and then run the command:

"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\devenv.exe" /RootSuffix VATest

the path to devenv.exe assumes you are using the Professional version, so you will need to edit the path if not. This will create and load a new, default profile for VS2017, so you will be asked which settings to use. Also VA will not be installed when the IDE loads, so you will need to install VA from the:

IDE tools menu -> Extensions and Updates...

dialog, by searching online for VA. Once you have installed VA, can you please see if you still get this problem? In theory Find References will now work normally.

To load your existing IDE profile, along with all of your normal settings, just load the IDE normally without any command line parameters.

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

Zeblote
Tomato Guru

183 Posts

Posted - Jul 23 2018 :  2:39:42 PM  Show Profile  Reply with Quote
That command doesn't appear to work after changing the path to community. A few seconds after starting it loads all the settings from my account.

I don't have any extensions other than VA, UnrealVS, HLSL Tools, and whatever the defaults are though.

Edited by - Zeblote on Jul 23 2018 2:44:05 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18749 Posts

Posted - Jul 23 2018 :  3:09:34 PM  Show Profile  Reply with Quote
Which version of VS2017 community are you running? If there are any updates to install, does this make any difference?

Can you please export your VA and IDE settings and send them to me:

VA Options -> Performance -> Export Settings
IDE tools menu -> Import and Export Settings -> Export selected environment settings

I can then import them here and see if I can reproduce the problem on my VS2017 community here. 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

Zeblote
Tomato Guru

183 Posts

Posted - Jul 23 2018 :  5:43:37 PM  Show Profile  Reply with Quote
15.7.5, there don't seem to be updates available.
Just sent the files using that form.
Go to Top of Page

andriy.tylychko
New Member

4 Posts

Posted - Jul 24 2018 :  06:21:44 AM  Show Profile  Reply with Quote
I tried with a new VS account as you described. And I still have the issue. The behaviour is a bit convoluted but I haven't noticed any difference between new and old accounts. It feels like when I start searching, initially for ~ a second it's not blocked, probably while searching a current file, and results from a current file are output promptly, progress bar at ~ 5%, but this part is not consistent as I don't see on other searches. Then it freezes for e.g. 5-10 secs and after that VA outputs a bunch of results and unblocks VS. Then (sometimes, depends what I'm searching for) it continues searching for another couple of seconds and is responsive (progress bar is at ~ 80-90% and I can "stop" the search).

I see described behaviour when I try to "find references" while cursor was on `UGameEngine` symbol in `GameEngine.cpp` file.

VS2017 Pro 15.7.4, Windows 10 Enterprise, 2 Xeon CPUs with 16 physical cores in total (as it can be some multithreading contention)
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18749 Posts

Posted - Jul 24 2018 :  09:18:41 AM  Show Profile  Reply with Quote
Find References is designed to return the references from the current file before spreading out to scan the rest of the files, so that you have some results to look at and work with quickly, so in this sense this behaviour makes sense.

Which version of the Unreal Engine are you working with? It probably doesn't matter, but I am learning this can effect some things.

Using VS2015, Unreal Engine 4.18, VA 2283.1. When I do the same Find References the progress bar fills up fairly smoothly.

If you do a slower find, something that will produce more results in more files, does the progress bar fill up more smoothly, or do you just have to wait longer before the IDE will start to respond again?

If you have the time, can you please try turning Off:

VA Options -> Performance -> Enable multithreaded parsing

restarting the IDE, just to be sure this has taken effect, and then try running the Find References again. It should be slower, but does the IDE still get locked up? Or do things run more smoothly?

Multithreading should not be causing this problem, and most of our users work with multiple CPU cores, but it is something sensible to test.

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

Zeblote
Tomato Guru

183 Posts

Posted - Jul 24 2018 :  10:49:40 AM  Show Profile  Reply with Quote
I did some more experiments:
- Find References only *sometimes* blocks the ui.
- Rename *always* blocks the ui until it is done. Example: https://dl.dropboxusercontent.com/s/xehx4b8m3tmxi5h/2018-07-24_16-48-48.mp4
- Disabling multithreaded parsing fixes both of the above issues, but both things are a lot slower. The IDE does not have to be restarted to see the change.

Edited by - Zeblote on Jul 24 2018 10:57:05 AM
Go to Top of Page

andriy.tylychko
New Member

4 Posts

Posted - Jul 24 2018 :  12:14:08 PM  Show Profile  Reply with Quote
I can confirm this ^^. w/ single-threaded parsing it works as intended. side note: after disabling multithreaded parsing and restarting VS I wasn't able to find any references, every time I got message box that the symbol is not recognized (or something like this). only after pressing "Rebuild" symbol database, restarting VS and waiting until the sources are indexed it started to work again.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18749 Posts

Posted - Jul 24 2018 :  12:24:12 PM  Show Profile  Reply with Quote
Well, at least we now have a trigger and a rule. So far the closest I have come to a good theory is that stopping the Find References does not happen immediately while VA is generating template code. So if the status bar says that VA is working on a template, I need to wait a few moments for the Stop button press to take effect.

If you want to try some experiments with allowing VA to use some threads, but not all of the available threads, this page explains the registry key setting that will do this. Obviously at the moment I cannot offer any advice on what would be a safe number of threads.

Do both of your machines have plenty of cooling? Could CPU or system temperature be a factor? It seems random, and does not explain why Rename always blocks the UI, but Find References only does sometimes, but it is a thought.

Assuming you have a test case that causes the IDE to hang for a while, could you please try and grab a mini dump of the IDE while it is being blocked? Hopefully this will offer some clues as to what is going on here. This page explains doing so, if you are not sure:

https://docs.wholetomato.com/default.asp?W303

Then 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
  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