microsoft / xlang

MIT License
877 stars 103 forks source link

pywinrt: precompiled header does not improve build time #768

Closed dlech closed 2 years ago

dlech commented 2 years ago

The current precompiled header for pywinrt doesn't include many files and therefore doesn't really improve the compile time. I've been experimenting in my fork and was able to decrease the compile time to about 1/3 of the current time.

First, I followed this blog post to do a performance capture. This showed that many of the generated header files were being parsed hundreds of times. So I changed things around to precompile all of the header files to get the performance improvement.

Here are the actual logs that can be viewed with Windows ADK. pywinrt_before.zip pywinrt_after.zip

Here are the related commits: https://github.com/dlech/xlang/commit/9799d543a8368e9fb1796dd58578eb9f5845e73, https://github.com/dlech/xlang/commit/05c56564c385f01d2e5478cedaa97d2f45f95a01, https://github.com/dlech/xlang/commit/5bf5c9e4e141cf8c974b6a5aaad56f0333912d57.

BenJKuhn commented 2 years ago

closing since pywinrt is now maintained in a new repo / project.