René's URL Explorer Experiment


Title: Faster image comparison decorator by mdboom · Pull Request #98 · matplotlib/matplotlib · GitHub

Open Graph Title: Faster image comparison decorator by mdboom · Pull Request #98 · matplotlib/matplotlib

X Title: Faster image comparison decorator by mdboom · Pull Request #98 · matplotlib/matplotlib

Description: This is a riff on the ideas in the comments on the pull requests by Paul @ivanov to reduce memory consumption when running the regression tests. See: #96 and #56 This is different from the other two in that it: Calls the test code to generate the figure object only once, and then calls savefig three times on the same figure -- this results in an ~ 12% speedup. Automatically closes all figures and restores rcParams and the unit registry after every test. The latter prevents some nasty side effect problems presented by some tests. This also revealed a memory leak in pyplot.close('all'). This saves massive amounts of memory vs. the current master, but it roughly equivalent to Paul's approach in pull request 96. Runs Inkscape in "shell" mode so that a single inkscape process is fired up and re-used to convert each SVG to PNG. This results in an additional ~ 32% speedup.

Open Graph Description: This is a riff on the ideas in the comments on the pull requests by Paul @ivanov to reduce memory consumption when running the regression tests. See: #96 and #56 This is different from the other t...

X Description: This is a riff on the ideas in the comments on the pull requests by Paul @ivanov to reduce memory consumption when running the regression tests. See: #96 and #56 This is different from the other t...

Opengraph URL: https://github.com/matplotlib/matplotlib/pull/98

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:caf51692-1444-af42-c5a1-eff748baccc2
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE9E8:15F25:403484:56ABCE:6A559658
html-safe-nonce48780859d9b4ebe9d6e591a9f42fb9c915f403d51b2a797dac10b567cd1a171a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOUU4OjE1RjI1OjQwMzQ4NDo1NkFCQ0U6NkE1NTk2NTgiLCJ2aXNpdG9yX2lkIjoiMTQxMjYwMDQwODgzNzU1OTg5NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaceec4f5cac3d87334b8c02001868c9422757771b253248070d46726f709b2c556
hovercard-subject-tagpull_request:129412
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/matplotlib/matplotlib/pull/98/files
twitter:imagehttps://avatars.githubusercontent.com/u/38294?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/38294?s=400&v=4
og:image:altThis is a riff on the ideas in the comments on the pull requests by Paul @ivanov to reduce memory consumption when running the regression tests. See: #96 and #56 This is different from the other t...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb5665c84831ed9ac4fb79519c16c9c5580ba8092fb8bb6e3e72972ec7197348e
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git
octolytics-dimension-user_id215947
octolytics-dimension-user_loginmatplotlib
octolytics-dimension-repository_id1385122
octolytics-dimension-repository_nwomatplotlib/matplotlib
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1385122
octolytics-dimension-repository_network_root_nwomatplotlib/matplotlib
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseaa21baa44893467b0b640d0300538f84ca8c475b
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/matplotlib/matplotlib/pull/98/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fpull%2F98%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fpull%2F98%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=matplotlib%2Fmatplotlib
Reloadhttps://github.com/matplotlib/matplotlib/pull/98/files
Reloadhttps://github.com/matplotlib/matplotlib/pull/98/files
Reloadhttps://github.com/matplotlib/matplotlib/pull/98/files
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/98/files
matplotlib https://github.com/matplotlib
matplotlibhttps://github.com/matplotlib/matplotlib
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/98/files
Notifications https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Fork 8.4k https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Star 23k https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Code https://github.com/matplotlib/matplotlib
Issues 1.1k https://github.com/matplotlib/matplotlib/issues
Pull requests 409 https://github.com/matplotlib/matplotlib/pulls
Actions https://github.com/matplotlib/matplotlib/actions
Projects https://github.com/matplotlib/matplotlib/projects
Wiki https://github.com/matplotlib/matplotlib/wiki
Security and quality 0 https://github.com/matplotlib/matplotlib/security
Insights https://github.com/matplotlib/matplotlib/pulse
Code https://github.com/matplotlib/matplotlib
Issues https://github.com/matplotlib/matplotlib/issues
Pull requests https://github.com/matplotlib/matplotlib/pulls
Actions https://github.com/matplotlib/matplotlib/actions
Projects https://github.com/matplotlib/matplotlib/projects
Wiki https://github.com/matplotlib/matplotlib/wiki
Security and quality https://github.com/matplotlib/matplotlib/security
Insights https://github.com/matplotlib/matplotlib/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fmatplotlib%2Fmatplotlib%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib%2Fissues%2Fnew%2Fchoose
mdboomhttps://github.com/mdboom
matplotlib:masterhttps://github.com/matplotlib/matplotlib/tree/master
mdboom:faster_image_comparison_decoratorhttps://github.com/mdboom/matplotlib/tree/faster_image_comparison_decorator
Conversation 8 https://github.com/matplotlib/matplotlib/pull/98
Commits 11 https://github.com/matplotlib/matplotlib/pull/98/commits
Checks 0 https://github.com/matplotlib/matplotlib/pull/98/checks
Files changed https://github.com/matplotlib/matplotlib/pull/98/files
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/98/files
Faster image comparison decorator https://github.com/matplotlib/matplotlib/pull/98/files#top
Show all changes 11 commits https://github.com/matplotlib/matplotlib/pull/98/files
27d4c0c Updates to the image comparison testing decorator: mdboom Apr 26, 2011 https://github.com/matplotlib/matplotlib/pull/98/commits/27d4c0c0635441390acf2c7e67e1fdaa573496cb
354dee8 Fix memory leak in pyplot.close('all') mdboom Apr 27, 2011 https://github.com/matplotlib/matplotlib/pull/98/commits/354dee8d3bd7d52cb025c1597522930fc2f5c3d0
a074823 Run inkscape for SVG conversion as a server -- prevents starting inks… mdboom Apr 27, 2011 https://github.com/matplotlib/matplotlib/pull/98/commits/a074823ff518c0b00c973c984f221478b58e95b0
9086ef1 Do N SVG->PNG conversions with inkscape before shutting down the inks… mdboom Apr 27, 2011 https://github.com/matplotlib/matplotlib/pull/98/commits/9086ef1a1c86e9f96d4d01893bfc13ac73596be8
84bd649 Reduce the number of dictionary copies around each test. Call the ma… mdboom Apr 27, 2011 https://github.com/matplotlib/matplotlib/pull/98/commits/84bd64924cd0dc34ab6966bcfec50b52d6c92c1a
ea16278 Fix new test decorator to work with nose-1.0.0 in addition to nose-0.… mdboom Apr 28, 2011 https://github.com/matplotlib/matplotlib/pull/98/commits/ea162783246d6b20b225f5281b2a54f0560a85eb
be6af2f obscure way of getting to the function, but works in 2.5 ivanov Apr 28, 2011 https://github.com/matplotlib/matplotlib/pull/98/commits/be6af2fcbefc4df113fb073bb5955f23b73d517b
5e50b90 reverting testing/compare.py back to master ivanov Apr 28, 2011 https://github.com/matplotlib/matplotlib/pull/98/commits/5e50b908bd46a789cf6afc657da236b275d61ce1
cc644a8 Fix indentation. mdboom Apr 28, 2011 https://github.com/matplotlib/matplotlib/pull/98/commits/cc644a8a9b50aab4253aaf7a0d5af08b8079684e
43ffb29 Merge remote-tracking branch 'ivanov/faster-image-comp' into faster_i… mdboom Apr 28, 2011 https://github.com/matplotlib/matplotlib/pull/98/commits/43ffb29cf58a15178850a86ba134dff7cf8655d0
bffb15d Revert back to using inkscape once for each SVG->PNG conversion, rath… mdboom Apr 28, 2011 https://github.com/matplotlib/matplotlib/pull/98/commits/bffb15d407deaf092d122815139c3d0a9bf835f3
Clear filters https://github.com/matplotlib/matplotlib/pull/98/files
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/98/files
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/98/files
_pylab_helpers.py https://github.com/matplotlib/matplotlib/pull/98/files#diff-6fee3de4018308e35f310215012b364f52aebf566b582176dc846399815b9397
compare.py https://github.com/matplotlib/matplotlib/pull/98/files#diff-fd30ddb745e32855148b48bfa1174cd0781f91304c48b8e522965444e79f89d0
decorators.py https://github.com/matplotlib/matplotlib/pull/98/files#diff-634eb58f2970e77b1feabc7824a5d757378ee8c3174867d1c7a1481a833637f3
polar_units_2.pdf https://github.com/matplotlib/matplotlib/pull/98/files#diff-42705b7fdff2bca693c40701eb4d9b1dbac4b7ead0855272bc950ac069723d1a
polar_units_2.png https://github.com/matplotlib/matplotlib/pull/98/files#diff-c44e2a25be14694cb35479b21668db86445b0f5ea88e23f4ec61e2d7a0df2ef7
polar_units_2.svg https://github.com/matplotlib/matplotlib/pull/98/files#diff-71fdd9711653b5b9549abaeb3aa39721f22302004378585c91c6679fcf47d40f
test_axes.py https://github.com/matplotlib/matplotlib/pull/98/files#diff-ef5144bd27a700deb760ef56ccf51dc6fcfe86723f9ffa84df7f024985bf3ee7
test_backend_pdf.py https://github.com/matplotlib/matplotlib/pull/98/files#diff-0cf7c590a99c89f9e99eab1f172e84e787ad55d64ad71227b5eb9d89a868ebbc
test_backend_svg.py https://github.com/matplotlib/matplotlib/pull/98/files#diff-596c8e30ca12976a87641765ff0dcb16ce3da0c8af5525b8067b5f1c03831a2f
test_dates.py https://github.com/matplotlib/matplotlib/pull/98/files#diff-f6b9882f4b670e33a47f77f7e12970c3be7ebd7f393f5406c721a6acbd52ec00
test_image.py https://github.com/matplotlib/matplotlib/pull/98/files#diff-8a96f32702b9c91b992e6cc9cb438eaaa26993101dbf40ea31ccbc097b47f68a
test_legend.py https://github.com/matplotlib/matplotlib/pull/98/files#diff-1b573023d84935306a147bec7f137e59ae79c3d4f3bbea81152eb0c94b58a579
test_mathtext.py https://github.com/matplotlib/matplotlib/pull/98/files#diff-17f9692b77108a62b59c71825d8461488729ef280f56785d3ad55ce3a86044d8
test_png.py https://github.com/matplotlib/matplotlib/pull/98/files#diff-3660bf7a815f6dc84f99fb21128413a01a380012ce178db39b41f255b0208314
test_simplification.py https://github.com/matplotlib/matplotlib/pull/98/files#diff-71f0404f2096d524ec7ff2923ef551c9c3bafe44511b0970d5d4be9bc97a26ab
test_spines.py https://github.com/matplotlib/matplotlib/pull/98/files#diff-343b9e3433a78abbdc48eb0714742a74e42f66c75f8ed613bbab5b29096491db
test_text.py https://github.com/matplotlib/matplotlib/pull/98/files#diff-48a87c3198fe994a8e31c16272b931d7dc307a88deba61086ca483ff44bacaa4
lib/matplotlib/_pylab_helpers.pyhttps://github.com/matplotlib/matplotlib/pull/98/files#diff-6fee3de4018308e35f310215012b364f52aebf566b582176dc846399815b9397
View file https://github.com/mdboom/matplotlib/blob/bffb15d407deaf092d122815139c3d0a9bf835f3/lib/matplotlib/_pylab_helpers.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/matplotlib/matplotlib/pull/98/{{ revealButtonHref }}
https://github.com/matplotlib/matplotlib/pull/98/files#diff-6fee3de4018308e35f310215012b364f52aebf566b582176dc846399815b9397
https://github.com/matplotlib/matplotlib/pull/98/files#diff-6fee3de4018308e35f310215012b364f52aebf566b582176dc846399815b9397
lib/matplotlib/testing/compare.pyhttps://github.com/matplotlib/matplotlib/pull/98/files#diff-fd30ddb745e32855148b48bfa1174cd0781f91304c48b8e522965444e79f89d0
View file https://github.com/mdboom/matplotlib/blob/bffb15d407deaf092d122815139c3d0a9bf835f3/lib/matplotlib/testing/compare.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/matplotlib/matplotlib/pull/98/{{ revealButtonHref }}
https://github.com/matplotlib/matplotlib/pull/98/files#diff-fd30ddb745e32855148b48bfa1174cd0781f91304c48b8e522965444e79f89d0
https://github.com/matplotlib/matplotlib/pull/98/files#diff-fd30ddb745e32855148b48bfa1174cd0781f91304c48b8e522965444e79f89d0
https://github.com/matplotlib/matplotlib/pull/98/files#diff-fd30ddb745e32855148b48bfa1174cd0781f91304c48b8e522965444e79f89d0
https://github.com/matplotlib/matplotlib/pull/98/files#diff-fd30ddb745e32855148b48bfa1174cd0781f91304c48b8e522965444e79f89d0
lib/matplotlib/testing/decorators.pyhttps://github.com/matplotlib/matplotlib/pull/98/files#diff-634eb58f2970e77b1feabc7824a5d757378ee8c3174867d1c7a1481a833637f3
View file https://github.com/mdboom/matplotlib/blob/bffb15d407deaf092d122815139c3d0a9bf835f3/lib/matplotlib/testing/decorators.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/matplotlib/matplotlib/pull/98/{{ revealButtonHref }}
https://github.com/matplotlib/matplotlib/pull/98/files#diff-634eb58f2970e77b1feabc7824a5d757378ee8c3174867d1c7a1481a833637f3
https://github.com/matplotlib/matplotlib/pull/98/files#diff-634eb58f2970e77b1feabc7824a5d757378ee8c3174867d1c7a1481a833637f3
https://github.com/matplotlib/matplotlib/pull/98/files#diff-634eb58f2970e77b1feabc7824a5d757378ee8c3174867d1c7a1481a833637f3
https://github.com/matplotlib/matplotlib/pull/98/files#diff-634eb58f2970e77b1feabc7824a5d757378ee8c3174867d1c7a1481a833637f3
https://github.com/matplotlib/matplotlib/pull/98/files#diff-634eb58f2970e77b1feabc7824a5d757378ee8c3174867d1c7a1481a833637f3
https://github.com/matplotlib/matplotlib/pull/98/files#diff-634eb58f2970e77b1feabc7824a5d757378ee8c3174867d1c7a1481a833637f3
https://github.com/matplotlib/matplotlib/pull/98/files#diff-634eb58f2970e77b1feabc7824a5d757378ee8c3174867d1c7a1481a833637f3
lib/matplotlib/tests/baseline_images/test_axes/polar_units_2.pdfhttps://github.com/matplotlib/matplotlib/pull/98/files#diff-42705b7fdff2bca693c40701eb4d9b1dbac4b7ead0855272bc950ac069723d1a
View file https://github.com/mdboom/matplotlib/blob/bffb15d407deaf092d122815139c3d0a9bf835f3/lib/matplotlib/tests/baseline_images/test_axes/polar_units_2.pdf
Open in desktop https://desktop.github.com
lib/matplotlib/tests/baseline_images/test_axes/polar_units_2.pnghttps://github.com/matplotlib/matplotlib/pull/98/files#diff-c44e2a25be14694cb35479b21668db86445b0f5ea88e23f4ec61e2d7a0df2ef7
View file https://github.com/mdboom/matplotlib/blob/bffb15d407deaf092d122815139c3d0a9bf835f3/lib/matplotlib/tests/baseline_images/test_axes/polar_units_2.png
Open in desktop https://desktop.github.com
Reload?https://github.com/matplotlib/matplotlib/pull/98/files
Please reload this pagehttps://github.com/matplotlib/matplotlib/pull/98/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.