Title: Faster title alignment by rcomer · Pull Request #28300 · matplotlib/matplotlib · GitHub
Open Graph Title: Faster title alignment by rcomer · Pull Request #28300 · matplotlib/matplotlib
X Title: Faster title alignment by rcomer · Pull Request #28300 · matplotlib/matplotlib
Description: PR summary Part of the calculation of top does not depend on title, so move it outside the loop. If no titles have been set, skip this logic entirely. I used fig_many.savefig(stream, format='svg', bbox_inches='tight') and fig_many_sharex.savefig(stream, format='svg', bbox_inches='tight') from #26150 as benchmarks. fig_many.savefig ran in ~320-330 ms regardless of this change. For fig_many_sharex I got With main: 484 ms ± 9.87 ms per loop (mean ± std. dev. of 7 runs, 1 loop each) After (1) 328 ms ± 8.95 ms per loop (mean ± std. dev. of 7 runs, 1 loop each) After (2) 230 ms ± 9.7 ms per loop (mean ± std. dev. of 7 runs, 1 loop each) PR checklist "closes #0000" is in the body of the PR description to link the related issue new and changed code is tested Plotting related features are demonstrated in an example New Features and API Changes are noted with a directive and release note Documentation complies with general and docstring guidelines
Open Graph Description: PR summary Part of the calculation of top does not depend on title, so move it outside the loop. If no titles have been set, skip this logic entirely. I used fig_many.savefig(stream, format='...
X Description: PR summary Part of the calculation of top does not depend on title, so move it outside the loop. If no titles have been set, skip this logic entirely. I used fig_many.savefig(stream, format=&...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/28300
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:d19d09b0-c447-2e44-8590-607a10d09e69 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E0A4:E7D9B:21FDA13:2D343E6:6A51F910 |
| html-safe-nonce | 788f00001b4baface1765731cffcd901b943bdf8467cf7b2d228b8e89c25902d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMEE0OkU3RDlCOjIxRkRBMTM6MkQzNDNFNjo2QTUxRjkxMCIsInZpc2l0b3JfaWQiOiI5MDU1OTAxODAxOTU0NTM5NzkyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | cd47e94a15220cf78dafc08137c3fd28cc23973cc6419ba676781f399181ee5c |
| hovercard-subject-tag | pull_request:1888464614 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/matplotlib/matplotlib/pull/28300/files |
| twitter:image | https://avatars.githubusercontent.com/u/10599679?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/10599679?s=400&v=4 |
| og:image:alt | PR summary Part of the calculation of top does not depend on title, so move it outside the loop. If no titles have been set, skip this logic entirely. I used fig_many.savefig(stream, format='... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width