Title: [Bug]: High CPU utilization of the macosx backend · Issue #28960 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: High CPU utilization of the macosx backend · Issue #28960 · matplotlib/matplotlib
X Title: [Bug]: High CPU utilization of the macosx backend · Issue #28960 · matplotlib/matplotlib
Description: Bug summary After showing interactive figure, the CPU utilization of python process went to 100%. Code for reproduction ####################################################### # Case 1: 100% cpu import matplotlib.pyplot as plt fig = plt....
Open Graph Description: Bug summary After showing interactive figure, the CPU utilization of python process went to 100%. Code for reproduction ####################################################### # Case 1: 100% cpu im...
X Description: Bug summary After showing interactive figure, the CPU utilization of python process went to 100%. Code for reproduction ####################################################### # Case 1: 100% cpu im...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/28960
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: High CPU utilization of the macosx backend","articleBody":"### Bug summary\n\nAfter showing interactive figure, the CPU utilization of python process went to 100%.\r\n\n\n### Code for reproduction\n\n```Python\n#######################################################\r\n# Case 1: 100% cpu\r\nimport matplotlib.pyplot as plt\r\nfig = plt.figure()\r\nplt.plot(range(5))\r\nplt.show()\r\n# after closing the window\r\nimport pandas # starting 100% CPU utilization\r\n\r\n#######################################################\r\n# Case 2: 100% cpu\r\nimport matplotlib.pyplot as plt\r\nimport pandas as pd\r\n\r\n# No CPU utilization at the moment\r\n\r\nfig = plt.figure()\r\ndf = pd.DataFrame(range(5))\r\n\r\nplt.plot(df[0]) # with this, CPU utilization is 100%.\r\nplt.show() # the same\r\n\r\n# after closing the window, still 100%\r\n\r\n#######################################################\r\n# Case 3: no issue.\r\nimport matplotlib.pyplot as plt\r\nfig = plt.figure()\r\nplt.plot(range(5))\r\nplt.show() # strangely, this has no problem.\n```\n\n\n### Actual outcome\n\nno problem except it consumes 100% cpu. The figure is still responsive.\n\n### Expected outcome\n\nmatplotlib backend should not consume 100% cpu.\r\n\n\n### Additional information\n\n- pandas version 2.2.3 (pip)\r\n\r\n- Certain operation (closing interactive figures) causes 100% cpu with 'macosx' backend. \r\n- Closing the figure, or calling `plt.close()` does not help. (backend: macosx)\r\n- No problem with `qt5agg` backend.\r\n\n\n### Operating system\n\nMac (Intel) Ventura 13.6.6\n\n### Matplotlib Version\n\n3.9.2\n\n### Matplotlib Backend\n\nmacosx\n\n### Python version\n\nPython 3.12.3\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\npip","author":{"url":"https://github.com/cinsk","@type":"Person","name":"cinsk"},"datePublished":"2024-10-09T21:31:04Z","url":"https://github.com/matplotlib/matplotlib/issues/28960"}
| 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:f4046a46-6fd5-d17d-8185-76b83c579089 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BE96:1619FB:163F42B:1E172AF:6B067E8C |
| html-safe-nonce | 199f3cbaca8b11f746ed5084d5074d23fce432e9b82bdf25a15028fb7902f6aa |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRTk2OjE2MTlGQjoxNjNGNDJCOjFFMTcyQUY6NkIwNjdFOEMiLCJ2aXNpdG9yX2lkIjoiODI1NDIwNTY0NjAzNjQzNDU3MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 146a9bbb5180f7dee7f09de7d04385a5551fe67a56863bc96b2d29b5383dc62b |
| hovercard-subject-tag | issue:2576997050 |
| 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/28960/issue_layout |
| twitter:image | https://opengraph.githubassets.com/28ce771026ce83dc826106da9cde2b2202e8fdad2705e524f5fc4293aed14248/matplotlib/matplotlib/issues/28960 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/28ce771026ce83dc826106da9cde2b2202e8fdad2705e524f5fc4293aed14248/matplotlib/matplotlib/issues/28960 |
| og:image:alt | Bug summary After showing interactive figure, the CPU utilization of python process went to 100%. Code for reproduction ####################################################### # Case 1: 100% cpu im... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | cinsk |
| 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