ubisoft / Sharpmake

Sharpmake is an open-source C#-based solution for generating project definition files, such as Visual Studio projects and solutions, GNU makefiles, Xcode projects, etc.
Apache License 2.0
927 stars 171 forks source link

Improve the performance on hot paths #256

Closed Michron closed 1 year ago

Michron commented 1 year ago

This PR adds some small tweaks that improve the performance on some of the hot paths in Sharpmake.

Main improvements involve:

In our own tests this brought down generating the solution to about 10 seconds instead of 20-24 seconds. This was tested by generating an existing solution again. Generating a solution from scratch would still take more time.

Original author of these changes is @MarchingCube

jspelletier commented 1 year ago

Interesting changes. I will try them soon on our game engine.

jspelletier commented 1 year ago

Interesting changes. I will try them soon on our game engine. Here are my results: <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">

Times are in seconds. |   |   |   -- | -- | -- | -- AMD Threadripper 12C/24T | Run1 | Run2 | Run3 commit c9df0aae | 34.719 | 34.524 | 34.558 PR256 | 32.777 | 31.885 | 32.057

As you can see, there is a slight improvement for us but much smaller than for you.

BTW, the timing are with a release executable and are the total time when running from Powershell given by Measure-Command

EDIT: These are the corrected numbers. There was also a problem with the current commit numbers.

jspelletier commented 1 year ago

merged. thanks