Symbol caching granularity (UE4 performance issues)

I'm coming to the end of my trial period and love the functionality, I'm intending to sign up. I have a couple of questions regarding performance issues with UE4.

Generally, there are some performance issues on a codebase as big as UE4, (e.g. sporadic lock ups of VC++) which have been reported elsewhere, and I can deal with. My main issue is the triggering of full source code re-parsing which maxes out CPUs for an extended period. I'd like to know on what level Resharper C++ identifies and caches symbols for source files. It would seem it does not do it globally by source file path, perhaps it's on the project/solution level?

UE4 projects treat .vcxproj files as generated, not persistent, files. They also generate a distinct .vcxproj for the engine for every UE4 project, even when the engine is identical. The only difference between the generated UE4.vcxproj will be the relative paths to engine source code, reflecting the differing locations of the UE4 projects on disk. It's a bit of a pain to have Resharper do full rescans for each project referencing the same engine source files (both in terms of time, and disk usage). What's even worse is when I need to switch back and forth between version control branches reflecting different UE4 engine versions, and this rescans each time.

It would be great if you could shed some light on exactly what will cause a full rescan, if there are any plans to change this behaviour, and/or what would need to change on the UE4 side of things to make Resharper work better with it in this respect. 


Comment actions Permalink

Could I at least get a response on this, please? 

Comment actions Permalink


Sorry about the late response. 

Why do you think that ReSharper scans the engine sources for each project separately?

Have you noticed when exactly do the full rescans occur? One scenario where it happens is when you reload a project, which you probably have to do after switching between VCS branches. It's a problematic case for ReSharper since it looks like files were just removed from the solution and then added back, so it duly purges them from the cache and reindexes. Reopening the solution after a branch switch could be faster in this case. Are there other events that trigger a full reindexing?


Comment actions Permalink

Hi Igor.

My fundamental question can be boiled down to the behavior when creating a new UE4 project. Say I have an existing UE4 Project A, based on a UE 4.16 installation, and Project A's solution has been scanned by R# and is up to date. Now I create a new UE4 Project B, associated with the same engine installation. I generate and open it's solution, and R# rescans all of the engine source again from scratch (the 'Updating source files' stage).

The same thing happens if I switch an existing UE4 project to use a different engine version. Even if I already have other projects using that engine version that have been scanned, it will still do the process again.

I assumed this was down to UE4 not reusing a single UE4.vcxproj for an engine installation engine, but creating one per project (though referencing all the same source files). However, I've just now done another test, where I simply create an empty VS solution and add to it a reference to the existing UE4.vcxproj from Project A. Again, R# begins a full and very lengthy 'Updating source files' process.

So it would appear R# doesn't share cached data at the project level, and everything is entirely separated at the solution level? In other words, from R#'s point of view, SolutionA/SharedVCXProj and SolutionB/SharedVCXProj are unrelated as far as data caching, even if they are the very same vcxproj file on disk. Is there a reason for this?

My idea was to look into adapting Unreal Build Tool to allow sharing of engine vcxsproj files, but from what I can see this wouldn't actually help.


Comment actions Permalink

That's right, at the moment all ReSharper caches are strictly per-solution, nothing is shared across different solutions. Creating a global cache across all solution probably would not be feasible with current architecture.

Inside a single solution however if there are two projects that reference the same files, these files should get indexed only once. Is it possible for you to have all projects that depend on the same UE vcxproj in the same solution?

Comment actions Permalink

That's a pity, but yep I figured it wasn't going to be something that could be changed easily. Having a master solution would require more fundamental changes to the UE4 build setup, but it's conceivable I could maybe set something like that up for my own projects. Thanks for the suggestion.

In the meantime, I have a request that would alleviate some of the issues to a degree. I'll post a new thread since it wouldn't be UE4 specific. Cheers.


Please sign in to leave a comment.