Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
getenv is very slow on Windows, so I replaced most of the logging cal…
…ls with a macro that is disabled by default. (#2826) getenv is very slow on Windows, so I replaced most of the logging calls with a macro that is disabled by default. Benchmark test (used a null target to exclude rendering impact): ``` ./synfig synfig-core/examples/pirates.sif -o pirates.png -t null ``` All benchmarks made on Release builds. Windows (MSVC) before: ``` Execution time: 28.352 s Execution time: 28.345 s Execution time: 28.391 s ``` Avg: 28362 ms Windows (MSVC) after: ``` Execution time: 6.140 s Execution time: 6.341 s Execution time: 6.201 s ``` Avg: 6227 ms Improvement: **4.55x faster** (455%) Windows (MinGW) before: ``` real 0m19.757s real 0m18.605s real 0m18.697s ``` Avg: 19019 ms Windows (MinGW) after: ``` real 0m6.842s real 0m6.816s real 0m6.772s ``` Avg: 6810 ms Improvement: **2,79x faster** (279%) Linux before: ``` ./synfig -o pirates.png -t null 3,72s user 0,39s system 109% cpu 3,756 total ./synfig -o pirates.png -t null 3,83s user 0,37s system 109% cpu 3,834 total ./synfig -o pirates.png -t null 3,71s user 0,42s system 109% cpu 3,778 total ``` Average: 3789 ms Linux after: ``` ./synfig -o pirates.png -t null 3,62s user 0,38s system 111% cpu 3,583 total ./synfig -o pirates.png -t null 3,50s user 0,40s system 110% cpu 3,523 total ./synfig -o pirates.png -t null 3,52s user 0,39s system 108% cpu 3,593 total ``` Average: 3566 ms Improvement: 0,06x (6%) macOS before: ``` ./synfig synfig-core/examples/pirates.sif -o - 2,85s user 0,31s system 108% cpu 2,928 total ./synfig synfig-core/examples/pirates.sif -o - 2,84s user 0,32s system 108% cpu 2,911 total ./synfig synfig-core/examples/pirates.sif -o - 2,83s user 0,31s system 108% cpu 2,898 total ``` Average: 2912 ms macOS after: ``` ./synfig synfig-core/examples/pirates.sif -o - 2,57s user 0,31s system 108% cpu 2,642 total ./synfig synfig-core/examples/pirates.sif -o - 2,57s user 0,31s system 109% cpu 2,642 total ./synfig synfig-core/examples/pirates.sif -o - 2,57s user 0,31s system 108% cpu 2,641 total ``` Average: 2642 ms Improvement: 0,1x (10%)
- Loading branch information
Showing
95 changed files
with
403 additions
and
393 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.