Title: Memory leak with surface plots · Issue #957 · plotly/plotly.js · GitHub
Open Graph Title: Memory leak with surface plots · Issue #957 · plotly/plotly.js
X Title: Memory leak with surface plots · Issue #957 · plotly/plotly.js
Description: I'm working in a Jupyter notebook with a number of plotly surface plots. I've noticed that after 4-5 plots are generated, my computer slows down considerably. Upon review, I realized that Chrome was consuming all of my 16gb of memory. Cl...
Open Graph Description: I'm working in a Jupyter notebook with a number of plotly surface plots. I've noticed that after 4-5 plots are generated, my computer slows down considerably. Upon review, I realized that Chrome wa...
X Description: I'm working in a Jupyter notebook with a number of plotly surface plots. I've noticed that after 4-5 plots are generated, my computer slows down considerably. Upon review, I realized that C...
Opengraph URL: https://github.com/plotly/plotly.js/issues/957
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Memory leak with surface plots","articleBody":"I'm working in a Jupyter notebook with a number of plotly surface plots. I've noticed that after 4-5 plots are generated, my computer slows down considerably. Upon review, I realized that Chrome was consuming all of my 16gb of memory. Closing the Chrome tab with the plots freed up 12gb of memory.\n\nHere's some simple code that attempts to reproduce the error. Apologies in advance if it crashes your machine.\n\n``` python\nimport numpy as np\n\nimport plotly\nimport plotly.graph_objs as go\n\nimport pandas as pd\n\nplotly.offline.init_notebook_mode(connected=True)\n\nfor _ in range(50):\n data = [go.Surface(z=np.random.randn(50, 50))]\n layout = go.Layout(\n width=500,\n height=500,\n margin=dict(\n l=65,\n r=50,\n b=65,\n t=90\n )\n )\n fig = go.Figure(data=data, layout=layout)\n plotly.offline.iplot(fig)\n```\n\nRunning it once is fine. A chunk of memory is used. No problem. But then if the same cell is reevaluated, removing the previous plots and replacing them with new ones, the memory only continues to climb. (You may need to rerun a few times to get the full effect.) We should expect totally memory usage to remain constant more or less. But things just keep climbing.\n\nI'm running Chrome 53.0.2785.116 on Mac OS X 10.11.6.\n","author":{"url":"https://github.com/samuela","@type":"Person","name":"samuela"},"datePublished":"2016-09-20T22:26:27Z","url":"https://github.com/plotly/plotly.js/issues/957"}
| 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:896e4db0-f619-9439-0e45-e65ca2a167e1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 91CC:A71F9:13B4C4C:18CEC86:6B01602B |
| html-safe-nonce | 2b10fb674a0f231a5d99a5d23a6e15a7311220856245acd4b3eb4a0171b5b85e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MUNDOkE3MUY5OjEzQjRDNEM6MThDRUM4Njo2QjAxNjAyQiIsInZpc2l0b3JfaWQiOiI3MDk0Mjk2ODczODgzNzU0NTM5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 6b096759c490cb8c92bec9375021f92083fbcba09f515adf9a7419677a64fde4 |
| hovercard-subject-tag | issue:178196556 |
| 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/plotly/plotly.js/957/issue_layout |
| twitter:image | https://opengraph.githubassets.com/735cec97ef623f110b894e2cee9ed1283cdf2481167a999ea6632502b3c9b908/plotly/plotly.js/issues/957 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/735cec97ef623f110b894e2cee9ed1283cdf2481167a999ea6632502b3c9b908/plotly/plotly.js/issues/957 |
| og:image:alt | I'm working in a Jupyter notebook with a number of plotly surface plots. I've noticed that after 4-5 plots are generated, my computer slows down considerably. Upon review, I realized that Chrome wa... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | samuela |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/plotly/plotly.js git https://github.com/plotly/plotly.js.git |
| octolytics-dimension-user_id | 5997976 |
| octolytics-dimension-user_login | plotly |
| octolytics-dimension-repository_id | 45646037 |
| octolytics-dimension-repository_nwo | plotly/plotly.js |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 45646037 |
| octolytics-dimension-repository_network_root_nwo | plotly/plotly.js |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width