Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 VA 2393: Performance issue with find references

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
kcbanner Posted - Nov 06 2020 : 11:46:34 AM
Hello,

After upgrading to 2393, Find References began working very slowly. In a large UE4 project, it starting taking minutes before results would appear in the dialog. Sometimes it appears just to stall and not have any results. I downgraded to 2389 and the issue went away (results started appearing in seconds).

I experimented with the threading settings, but nothing seems to fix this on 2393, it seems like performance regressed in this version.

Version details (after downgrade to 10.9.2389.0):


VA_X.dll file version 10.9.2389.0 built 2020.09.03
DevEnv.exe version 16.6.30320.27 Community
msenv.dll version 16.0.30309.148
Comctl32.dll version 6.10.19041.488
Windows 10 10.0 2004 Build 19041.572 
8 processors (x86-64, WOW64)
Language info: 1252, 0x409

Platform: Project defined
Stable Includes:
C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\Include\um;
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\cppwinrt;
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\winrt;
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\shared;
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um;
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\VS\UnitTest\include;
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt;
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\VS\include;
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\atlmfc\include;
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include;
C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.2\include\um;
C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt;
C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared;
C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um;
C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt;
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\DIA SDK\include;
C:\Program Files\Common Files;

Other Includes:

Stable Source Directories:
C:\Program Files (x86)\Windows Kits\10\Source\10.0.18362.0\ucrt;
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\VS\src;
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\crt\src;
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\atlmfc\src\atl;
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\atlmfc\src\mfcm;
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\atlmfc\src\mfc;


15   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Jan 27 2021 : 10:37:40 AM
I don't follow. The batch file is looking to run the command:

"%~dp0Engine\Extras\VisualStudioDebugging\PS4\InstallPS4Visualizer.bat"

and from this page:

https://stackoverflow.com/questions/5034076/what-does-dp0-mean-and-how-does-it-work#5034119

the start of the command, "%~dp0" expands to the drive letter and path of that batch file.

So, using the paths from my system, if the batch file is placed in the directory:

C:\Program Files\Epic Games\UE_4.26
then the batch file will expand this variable to run the command:

C:\Program Files\Epic Games\UE_4.26\Engine\Extras\VisualStudioDebugging\PS4\InstallPS4Visualizer.bat

so the batch file is sitting inside the file system junction, so can be found at either:

C:\Program Files\Epic Games\UE_4.26\GenerateProjectFiles.bat - which uses the junction path that VA understands correctly

or at:

C:\src_epic_launcher\UE_4.26\GenerateProjectFiles.bat - the "natural" location of the batch file, which will use the paths that VA won't handle so well.

What don't I understand here?
kcbanner Posted - Jan 26 2021 : 10:39:57 AM

This is the script, run from the root of the checkout:
https://github.com/EpicGames/UnrealEngine/blob/release/GenerateProjectFiles.bat

It's not run inside the Engine folder, but one folder up, so it's sibling to the Engine and the Game folder.
feline Posted - Jan 26 2021 : 07:19:51 AM
How do you run the UE4 solution generator batch script?

I have found that if I run the UE editor via the junction path, the updated / generated files use the engine path that I used to run the editor. So if I run:

C:\src_epic_launcher\UE_4.26\Engine\Binaries\Win64\UE4Editor.exe

then the UE solution that I work with will point at the engine found via this path.

If instead I use the junction point, and run:

C:\Program Files\Epic Games\UE_4.26\Engine\Binaries\Win64\UE4Editor.exe

then the UE solution will point at the engine found via this path.

Can you run your batch file via the junction path, and see if the same holds true for you?
kcbanner Posted - Jan 25 2021 : 1:13:58 PM
VA Options -> Unreal Engine -> Enable support for Unreal Engine 4

Set to Always
VA Options -> Unreal Engine -> Enable Enhanced Syntax Coloring in UE4 macros

Enabled
VA Options -> Unreal Engine -> Suggest VA Snippets inside UE4 macros

This one is greyed out and disabled (I have "Include VA Snippets" off)

GENERATED_BODY and USTRUCT, etc macros are not in italics.

Alt-G on TArray gives me a popup where I can select either
"Engine\Source\Runtime\Core\Public\Containers\Array.h:279"
"Engine\Source\Runtime\Experimental\ChaosCore\Public\Chaos\Array.h:279"

When I open those, they report their real path, not the one through the junction point.
Changing the include paths in the solution isn't really possible as they are generated by the UE4 solution generator batch script and include relative paths. This is probably why the detection is not working?

feline Posted - Jan 25 2021 : 11:33:04 AM
What do you have the following VA options set to:

VA Options -> Unreal Engine -> Enable support for Unreal Engine 4
When a solution contains a project named UE4
Always
VA Options -> Unreal Engine -> Enable Enhanced Syntax Coloring in UE4 macros
VA Options -> Unreal Engine -> Suggest VA Snippets inside UE4 macros

Are UE macros, "GENERATED_BODY" and "UPROPERTY" being shown in italics or not?

If you use Alt-G on a standard Unreal Engine type, for example "TArray", what happens? Testing this here, with an Unreal Engine solution where the actual engine is located under:

C:\src_epic_launcher\UE_4.26
and a junction point at:

C:\Program Files\Epic Games\UE_4.26
and in the unreal game solution I have updated the paths in the UE4 project files to point at the junction point.

When I use Alt-G I get a menu, offering several locations for TArray, and when I go to "Array.h" VA reports this as the file:

C:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Experimental\ChaosCore\Public\Chaos\Array.h

so it is using the junction paths, as expected. TArray is also shown in italics in the editor.
kcbanner Posted - Jan 21 2021 : 11:28:33 AM
Actually - I thought it was working, I have the symlink directory "C:\Program Files\Epic Games\UE_4.25\Source" in my C/C++ Directories, under custom, in both source files and include files. That symlink points to the Source directory where the engine actually is (checked out as part of a perforce workspace on another drive).

I noticed that when I select "show system symbols in italics" that the UE4 symbols aren't in italics, which tells me that this isn't actually working.

Is there a way I can just specify my UE4 directory via a registry parameter? It seems like it isn't recognizing my checkout.
feline Posted - Nov 23 2020 : 10:12:37 AM
Thank you for the update. I am not sure why your Find References performance changed with a different version of VA though, that is odd.

Is everything now working correctly for you? You should also be seeing VA suggestions for Unreal Engine now, which may not have been working correctly before:

https://docs.wholetomato.com/default.asp?W812
kcbanner Posted - Nov 20 2020 : 2:02:12 PM
I was able to add the symlink directory under "Custom" in C/C++ Directories, and this does seem to help with the issue.
kcbanner Posted - Nov 20 2020 : 1:49:59 PM
Ah I see!

I tried the symlink, but I didn't get the include directories showing up inside in the VA options dialog. I think it may be because since our vcxproj files are in E:\Workspace\<WorkspaceName>\Engine\Intermediate\ProjectFiles\, everything is defined relatively to that, not an absolute path to the engine.

ie: <ClCompile Include="..\..\Source\Some\Engine\File.cpp"/>
feline Posted - Nov 20 2020 : 1:32:33 PM
There is currently a known problem that VA doesn't detect the Unreal Engine directory tree as Unreal Engine if it is installed outside of:

C:\Program Files
which may well be a factor here. To work around this we can use a Windows file system junction point. Can you please:

Create the directory

C:\Program Files\Epic Games
Open a command prompt inside this directory, and run the command:

mklink /J UE_4.25 "E:\Workspace\<WorkspaceName>\Engine"

Where the second path is the directory where you have installed / placed Unreal Engine. This will create a directory link inside the Windows file system, so while Unreal Engine will appear to exist inside this Program Files sub-directory, is still where it was originally installed.

Now make sure all instances of the IDE are closed, and then go into the directory that holds your game solution. From here you should find in the following files:

Intermediate\ProjectFiles\UE4.vcxproj
Intermediate\ProjectFiles\UE4.vcxproj.filters

Open both files in a text editor, and do a search and replace for the old Unreal Engine path to the new Unreal Engine path, so in this case search

"E:\Workspace\<WorkspaceName>\Engine\"

And turn all instances into:

"C:\Program Files\Epic Games\UE_4.25\"

Save the changes and now reload the IDE and your solution. Now if you look at the VA stable include directories in the VA Options dialog, all of the sub-directories inside your UE engine directory tree should be listed, via the C drive junction point path.

This should get VA's Unreal Engine support working much more reliably for you, on your system. Hopefully it will also fix the problem with Find References.
kcbanner Posted - Nov 20 2020 : 12:59:49 PM
I usually leave "Display references from all projects" off unless I am specifically searching for something across our game and the engine. I tried with both in this case.

UE4 is inline with the repository for our game - so it's in `E:\Workspace\<WorkspaceName>\Engine`. I can test this again and manually add those directories to static includes.

feline Posted - Nov 09 2020 : 2:33:07 PM
Unfortunately no sign of this problem here for me, using VS2019 and VA 2393.0. Find References works normally for me. Once you have some Find References results, if you right click in the results window, do you have:

Display references from all projects

turned On or Off? Does changing this setting make any difference?

It is possible that getting VA Unreal Engine support working correctly will help here, but that doesn't explain the recent change in how VA works here.

Which directory and drive is Unreal Engine installed to? I am guessing that if it is installed to C drive it is not installed under

C:\Program Files\Epic Games\
kcbanner Posted - Nov 09 2020 : 12:47:11 PM
The symbol in this case was UNetConnection::InternalAck. Unreal Engine support is turned on in both versions.
feline Posted - Nov 09 2020 : 06:40:27 AM
Also, did you edit your stable include directories list before posting it here? Or do you have Unreal Engine support turned off?

VA Options -> Unreal Engine -> Enable support for Unreal Engine 4
When a solution contains a project named UE4
Always

I ask because if Unreal Engine support is picking up that you are working with Unreal Engine correctly, and is turned On, then all of the sub-directories inside your Unreal Engine directory tree should have been added to your stable include directories.

However, if these settings haven't changed then this shouldn't be a factor. It might be worth looking at fixing this after we look at the slow find references though.
ChrisG Posted - Nov 08 2020 : 7:50:58 PM
Was there a particular symbol that you recall was giving you issues?

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000