Title: 1.4.0rc1: Python-level memory "leak" (internal font cache?) · Issue #3264 · matplotlib/matplotlib · GitHub
Open Graph Title: 1.4.0rc1: Python-level memory "leak" (internal font cache?) · Issue #3264 · matplotlib/matplotlib
X Title: 1.4.0rc1: Python-level memory "leak" (internal font cache?) · Issue #3264 · matplotlib/matplotlib
Description: I'm currently testing the 1.4.0rc1 (had to change the min_version of freetype2 to 1.3, see #3262). It seems that the memory leak reported in #3197 is gone, but I still see a very slow but considerable increase in resident memory, and in ...
Open Graph Description: I'm currently testing the 1.4.0rc1 (had to change the min_version of freetype2 to 1.3, see #3262). It seems that the memory leak reported in #3197 is gone, but I still see a very slow but considera...
X Description: I'm currently testing the 1.4.0rc1 (had to change the min_version of freetype2 to 1.3, see #3262). It seems that the memory leak reported in #3197 is gone, but I still see a very slow but consi...
Mail addresses
notifications@github.com
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/3264
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"1.4.0rc1: Python-level memory \"leak\" (internal font cache?)","articleBody":"I'm currently testing the 1.4.0rc1 (had to change the min_version of freetype2 to 1.3, see #3262). It seems that the memory leak reported in #3197 is gone, but I still see a very slow but considerable increase in resident memory, and in fact I can observe a constant Python object count growth of the following classes:\n\n```\n__builtin__.list 14645 +114\n__builtin__.dict 18076 +114\nmatplotlib.font_manager.FontProperties 761 +114\n```\n\n(measured using [objgraph](https://pypi.python.org/pypi/objgraph))\n\nSo I think between 1.3.1 and 1.4.0rc1 some kind of new \"leak\" appeared on Python level. It's not a real leak as the objects are accessible, so I guess it's a kind of internal font (property) cache which doesn't clear up old entries.\n\nTest script: \n\n``` python\nimport numpy as np\nimport matplotlib as mpl\nmpl.use('agg')\nimport matplotlib.pyplot as plt\n\nfor i in range(100000):\n fig, ax = plt.subplots() \n\n circle1=plt.Circle((0,0),2,color='r',rasterized=True)\n ax.add_artist(circle1)\n\n fig.savefig('test.svg')\n plt.close(fig)\n```\n\n**EDIT:** I had measured object count growth for 1.3.1 also, and there was no growth of any class there.\n","author":{"url":"https://github.com/letmaik","@type":"Person","name":"letmaik"},"datePublished":"2014-07-15T14:45:43Z","url":"https://github.com/matplotlib/matplotlib/issues/3264"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5f9d5c49-ebbc-8c8a-f01e-8cdca1ad7178 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A69C:1916FD:54A4D7:74627C:6B068B28 |
| html-safe-nonce | 45696f95b9f5b5104feaaafd2d195ee5862bf270e483618d0ff3cff5ab8a2067 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNjlDOjE5MTZGRDo1NEE0RDc6NzQ2MjdDOjZCMDY4QjI4IiwidmlzaXRvcl9pZCI6IjM3MDM3MTg4NjU3MTc4NTcwNjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c108f56ed3afccfb09e3589bc779a2eb4e5af3f07c2f90762209e726b371863c |
| hovercard-subject-tag | issue:37890329 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/matplotlib/matplotlib/3264/issue_layout |
| twitter:image | https://opengraph.githubassets.com/80ef5bdb2dc13ae5859bc3c6a30bc787950d6428763ff85fdf85eb939a01918b/matplotlib/matplotlib/issues/3264 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/80ef5bdb2dc13ae5859bc3c6a30bc787950d6428763ff85fdf85eb939a01918b/matplotlib/matplotlib/issues/3264 |
| og:image:alt | I'm currently testing the 1.4.0rc1 (had to change the min_version of freetype2 to 1.3, see #3262). It seems that the memory leak reported in #3197 is gone, but I still see a very slow but considera... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | letmaik |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4462ff7ebfd3d551f202659f2423dae617b6849d23b1df6465dc504ef497d14a |
| turbo-cache-control | no-preview |
| 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 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6d3909414814ff86ce7da4c51a0f4918a13fb41b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width