Skip to content
This repository has been archived by the owner on Feb 4, 2020. It is now read-only.

Use CLCACHE_SINGLEFILE to display actual function calls in cProfile #367

Closed
wants to merge 1 commit into from
Closed

Use CLCACHE_SINGLEFILE to display actual function calls in cProfile #367

wants to merge 1 commit into from

Conversation

Artalus
Copy link

@Artalus Artalus commented Dec 11, 2019

This is one possible way to fix #364 .

If you are certain that your build system won't call clcache.exe with multiple source files to compile (AFAIK it is only used by MSBuild to compile sources in parallel with /MP), you can set CLCACHE_SINGLEFILE environment variable to avoid using concurrent.futures.ThreadPoolExecutor and simply call processSingleSource once, avoiding additional process creation. This might increase performance tiny bit, but mostly this is about seing in cProfile results which function calls actually happened and how did they affect the performance.

Another option might be introducing CLCACHE_SINGLETHREAD to simply iterate over file list in a for loop without concurrency. Or maybe even make this decision based on CLCACHE_PROFILE presence.

@trassir trassir closed this by deleting the head repository Jul 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ThreadPoolExecutor / concurrent.futures.as_completed prevent cProfile from providing actual info
2 participants