-
Notifications
You must be signed in to change notification settings - Fork 83
All cache misses after recompilation if using Visual Studio directly for compiling instead of cmake #135
Comments
A cache miss occurs in case
You can tell which of these two are happening for you by monitoring the cache statistics. Cache misses caused by 1. are going to cause increased numbers in the 'passed to real compiler' section. In case you're bit by number 2., I suggest setting the |
What I see is during two consecutive VS builds a lot of evictions: $ clcache -s |
@sowsem I'm sorry, I must be doing something wrong. I just can't seem to reproduce this problem here - maybe it's because of my CMake version (2.8.11)? Would it be possible for you to provide a little sample project (some sort of hello world or so) and then let me know how exactly you're building the problem? In particular, which compiler and which version of 'msbuild' do you use? I'm confident that once I can reproduce the issue on my end, fixing it shouldn't be very hard. |
Sorry for the late reply due to vacation period. It is kinda difficult to me to provide a helloworld sample due to the privacy restrictions I have in that code. I am using cmake 3.4 and lots of specific cmake macros so a helloworld sample would include lot of stuff probably I am not allowed to share unfortunately. I can investigate myself and probably to not bother you anymore with this specific issue, you can close it. If I find something more specific, I can come back and open a new issue. Anyway, thanks a lot for all the help on this! You are amazingly responsive! |
Can this be caused by VS studio removing cache data in a clean step? |
But cache data belongs to clcache, doesn't it? No matter what VS is doing, as long as the compiler call is being proxied to clcache and that the command is the same... am I wrong? (and more stuff) |
@sowsem in issue #33 someone noticed that Visual Studio would seem to delete more files (in particular, files belonging to clcache) than expected. Some research led to #33 (comment) in which I describe that it appears that Visual Studio apparently traces all file accesses done during a project. So maybe that's what's biting you - in that comment, I also mention how to disable this feature and for the reporter it helped. |
Cool! I will give it a try! Thx! |
It has worked like a charm! All cache hits now! Thanks a lot! This can be closed! It would be good btw to add this info into the main github page, as many people is using VS as IDE and will end up with this issue again. |
@sowsem Glad to hear that it helped. Since the README file is getting a bit too long for my taste, I started a wiki page on known caveats and just reference that. |
Excellent! Again, thanks a lot for the help! |
Compling from cmake in Windows actually works quite well and there are lots of cache hits for recompilations.
The tricky thing is that if instead I generate the VS solution and then compile. Then I remove the solution and generate it back again and try to build the solution again from VS, I always get cache misses.
Another case: If I compile with the cmake, then delete the project and recompile with cmake, there are lots of cache hits.
If now I delete the project and generate the visual studio solution, open it and build solution, I get 0 cache hits, all cache misses.
The text was updated successfully, but these errors were encountered: