Unnecessary memoization invalidation
Mathew Robinson <[email protected]>
| Newsgroups | gmane.comp.programming.tools.scons.user |
|---|---|
| Message-ID | <[email protected]> |
Hello all, While doing build system performance work at MongoDB I've found a few areas where the memoization isn't shared between threads (similar to the ninfo bug I resolved a few months back) and most importantly that Node._clear_memoized_values is being called a little too aggressively. By removing a few call sites of Node._clear_memoized_values I was able to remove a few thousand extra calls to stat which had perf benefits for our build. I didn't measure the impact on every memoized value. Given the sensitivity and difficulty of caching I wanted to reach out here before sending a PR. Additionally I noticed that for commands that don't change and in WhereIs there is no memoization. This causes ~60 - 100 thousand unnecessary stat calls for our builds. I'd like to memoize WhereIs at a minimum as well, though that change is unrelated to the above. Thanks, - Mathew Robinson @chasinglogic _______________________________________________ Scons-users mailing list [email protected] https://pairlist4.pair.net/mailman/listinfo/scons-users