Viladoman / CompileScore

Tools for profiling and visualizing C++ build times.
MIT License
464 stars 19 forks source link

OutputFile.scor works fine in Compiler Score binary, but doesn't load properly in VS extension #23

Closed missmah closed 2 years ago

missmah commented 2 years ago

Unsure why, but the VS extension seems to have trouble loading external files that the Compiler Score file loads properly.

Related to that, I'm not able to get any timings inline in the source files at all.

It seems hard to get it the .vsix extension to work at all with an externally generated score file -- it would be nice if the UI had an explicit "load from file" or "reload from file" button.

missmah commented 2 years ago

Set to use custom external file location, which does exist, and which Compiler Score loads properly: image

The file exists: image

The file loads properly in Compiler Score: image

No Inline Include Timings: image

Show Timeline is greyed out: image

Forcing a build from the Extensions -> Compiler Score -> Build Solution and Profile does bring up the timings window, but it's empty (likely because the current build from within VS triggered a vs2015 build): image

And, if I force it to "Load Default", it tries, but it doesn't actually load it (it just seems to sit there forever): image

Viladoman commented 2 years ago

Oh interesting! It looks like you are running on Compile Score version 1.7.0. There might be an issue with how the progressive loading is handling the needed data. I made some changes so that VS only loads the data when it needs it instead of always on boot, so I don't use memory when the profiler is not open or used. But it looks like there might be some code paths that are not covered.

I am still testing v1.7.0, that's why I haven't still pushed it to the VS marketplace. This should work as expected with the previous version of the plugin.

Thanks for letting me know about this regression. I will have a look as soon as I have some time. Super appreciated!

missmah commented 2 years ago

I think the CompilerScore and ScoreDataExtractor might be v1.7.0 (I downloaded them from the GitHub page); however, the .vsix extension is actually v1.6.0: image

Is it possible that the v1.6.0 .vsix and the data generated by the v.1.7.0 ScoreDataExtractor command line tool are incompatible?

missmah commented 2 years ago

Unfortunately, ScoreDataExtractor doesn't seem to have a -version flag (but I did download it from Releases today), so should be v1.7.0 :)

Viladoman commented 2 years ago

They are not compatible. v1.6.0 does not know how to read things extracted from v1.7.0. I bumped the data version number to 6, so 1.7 can open 1.6 files but not the other way around.

You can get the new VSIXs from the latest github release. I am still testing it before pushing it to the main marketplace for automatic rollover.

Let me know if the issue still persists and I will look over this weekend.

EDIT: I will totally add the ScoreDataExtractio -version

missmah commented 2 years ago

Thanks! I'll try that now!

missmah commented 2 years ago

It worked for a quick moment, I think! Then, I went and setup an automated pipeline for doing this in our build system, which involved me changing the paths where the files are stored and stuff. I updated them in VS, but it doesn't seem to be picking that up. Maybe this is a bug in v1.7.0? (It might pick it up after a reboot of VS?)

Or do I just need to give it some time?

missmah commented 2 years ago

For reference, here are my new paths: image

Our build system now generates a score there whenever you build with --profile-includes

missmah commented 2 years ago

image

missmah commented 2 years ago

Update to this is that on Friday night, I got this working well, and roughly halved our single-platform non-Unity MSVC build times! :) Thanks!

missmah commented 2 years ago

I did run into one bug though: https://github.com/Viladoman/CompileScore/issues/24

missmah commented 2 years ago

Continuing my work leftover from Friday today, I also just ran into this issue: https://github.com/Viladoman/CompileScore/issues/25

Viladoman commented 2 years ago

Amazing! I am glad to hear it worked, despite these new issues.

missmah commented 2 years ago

Yes, a sincere thank you for building and open sourcing this tool, it's really great!

missmah commented 2 years ago

P.S. Do you have a place I can send you a thank you Venmo type thing?

Viladoman commented 2 years ago

Thank you! I appreciate it. I am glad more people can take advantage of this.

Regarding any sort of donation, I only have a basic paypal setup at the moment. I am currently living in Canada, and as far as I know Venmo is not available here.