Commit d5f17b7
perf: skip savefig rendering in PYAUTO_FAST_PLOTS mode
When PYAUTO_FAST_PLOTS=1, skip fig.savefig() in save_figure() and
subplot_save(). The figure is still created, data computed, and all
matplotlib drawing calls (imshow, plot, etc.) still execute — only
the final rendering to file is bypassed. This avoids expensive font
discovery and text metrics computation during smoke tests.
Also cache the env var lookup at module import time for efficiency.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 408ceee commit d5f17b7
1 file changed
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
22 | | - | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
| |||
338 | 341 | | |
339 | 342 | | |
340 | 343 | | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
341 | 348 | | |
342 | 349 | | |
343 | 350 | | |
| |||
508 | 515 | | |
509 | 516 | | |
510 | 517 | | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
511 | 522 | | |
512 | 523 | | |
513 | 524 | | |
| |||
0 commit comments