T O P I C R E V I E W |
jay.carlton |
Posted - Apr 03 2013 : 1:48:15 PM Hi,
Does the symbol database or individual files get marked for a reparse when either network drives get remapped or file system junctions change? Our CM plan requires source and binary files and internal scripts to use paths relative to specified drive letters, so we have to reassign network drives whenever we switch between builds if we want to have more than one branch or label checked out at once. One interesting side effect of this is with TFS workspaces; since those use absolute paths from a branch to a local machine, we typically use junctions in addition to network drives so that the IDE sees full paths starting with z:, y:, etc. Since all the project files and build commands use these full paths, it can tend to confuse tools and users alike.
I'm wondering what happens if VA X notices a file is now older than it was the last time it saw it, for example, or if it sees a file identical to one it's seen before, just in a new directory. Does it fully expand network drives to UNC paths or something to determine uniqueness? For example, if I had a file c:\\v1\\foo.h and c:\\v2\\foo.h that matched exactly, and re-mapped z: from c:\\v1 to c:\\v2, does VA X consider the file to have changed? Conversely, if the foo.h from v2 is older than the v1 copy (e.g. if I checked out v1 from source control at a later date), and I switch from v1 to v2, could that confuse VA X? I'd probably want a reparse when that happened, but
One issue I did see was when I use a junction substitution on the projects in a solution file (but not on the solution file itself); VA was suggesting function definitions on different versions of the same source file (one under version N's physical directory, and one under version N+1's). I believe I've solved that problem by checking in the solution in question. I'm leaning toward the opinion that if junctions fool Visual Studio and TFS, they should probably fool Visual Assist as well, so that may not actually be an issue. But I think network drive substitutions are much more common and much less evil.
Finally, if several solutions include the same project file, does that project and its dependencies get reparsed every time one of the solution files containing it is opened? Same question for multiple projects including the same header.
Thanks. Hopefully some of that makes sense. I'm a new user, but I love what I've seen so far. |
5 L A T E S T R E P L I E S (Newest First) |
feline |
Posted - Apr 04 2013 : 1:39:23 PM Its good to know this is working well, you are doing something slightly unusual, with all these mapped drive letters and junction points, so no problems is good news 
If you were not doing the full parse on solution load then you might see VA getting confused over which symbols are supposed to be in which solutions, so that's something to be aware of since I don't think VA tries to expand junction points.
If you have any problems please let me know and I will do what I can to help. |
jay.carlton |
Posted - Apr 04 2013 : 11:40:18 AM VA X is working excellently so far. We have millions of lines of code in hundreds of projects, and so far VA hasn't slowed us down too much.
I was mainly curious as to the best practices when the same sets of files were referred to from multiple projects. Greedily reparsing everything seems to be fast enough for now, so I suppose the answer is just not to worry about it.
Thanks again.
|
feline |
Posted - Apr 04 2013 : 11:12:40 AM The "Parse all files when opening a project" applies to solutions as well. In my experience the IDE is not interested in opening a project on its own, it always wants to open the solution that contains the project instead.
The stable include directories are an "all or nothing", we don't look for changes in them, since the expectation is they will only change occasionally, e.g. when you move to a new version of a 3rd party library you are using. If I understand correctly VA viewing your stable include directories as unchanging is a fairly accurate view of things.
If and when you do find that you do need to tell VA to update its view of the stable include directories simply press the button:
VA Options -> Performance -> Rebuild symbol databases
and restart the IDE. Normally this will only take a few minutes, unless you have an extremely large solution and set of stable include directories.
Is VA working well for you so far, and handling your directory and solution changes correctly? Hopefully my answers have helped to explain what to do and expect here. |
jay.carlton |
Posted - Apr 03 2013 : 2:09:47 PM Thanks for the quick response. It looks like I've already got that box checked. What happens when I open a solution file instead of just opening the project file?
Our stable directories are subject to re-substitution, although in practice some are much more stable than others. The vast majority of the low-level dependencies are configured side by side with the higher level projects, and when we switch we switch everything.
At the bottom level, those headers that do change almost always change by addition. For example a low-level header used by dozens of projects might get a new function added, but rarely is anything removed. I don't know if that could help with performance any, though, since you can't really make that assumption across the board.
I didn't realize the stability options controlled more than just which symbols were italicized. That's interesting. |
feline |
Posted - Apr 03 2013 : 1:55:00 PM I would suggest turning On:
VA Options -> Performance -> Parse all files when opening a project
so that VA will reparse your entire solution when you open it. This way you should avoid any problems caused by files changing but their date and time not suggesting they have changed.
Do your stable include directories, libraries you use, also change like this? Or are they actually stable? As the name suggests, VA does not expect these directories to change, so it can parse them once and then not reparse them again until the full database needs to be rebuilt. |
|
|