{"id":19942094,"url":"https://github.com/day8/office-js-memory-leak","last_synced_at":"2026-03-06T13:02:55.819Z","repository":{"id":53284717,"uuid":"247589077","full_name":"day8/office-js-memory-leak","owner":"day8","description":null,"archived":false,"fork":false,"pushed_at":"2021-03-31T21:28:51.000Z","size":161,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-01T13:16:46.698Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/day8.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-16T02:05:18.000Z","updated_at":"2023-07-25T14:33:48.000Z","dependencies_parsed_at":"2022-08-28T17:30:33.666Z","dependency_job_id":null,"html_url":"https://github.com/day8/office-js-memory-leak","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/day8/office-js-memory-leak","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/day8%2Foffice-js-memory-leak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/day8%2Foffice-js-memory-leak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/day8%2Foffice-js-memory-leak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/day8%2Foffice-js-memory-leak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/day8","download_url":"https://codeload.github.com/day8/office-js-memory-leak/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/day8%2Foffice-js-memory-leak/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30178286,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T12:39:21.703Z","status":"ssl_error","status_checked_at":"2026-03-06T12:36:09.819Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T00:11:41.182Z","updated_at":"2026-03-06T13:02:55.795Z","avatar_url":"https://github.com/day8.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nThis repo provides a minimal demonstration of [office-js issue #1054](https://github.com/OfficeDev/office-js/issues/1054). It has been created using the Microsoft Yeoman office-js generator.\n\n\n## To Show The Problem\n\n1. Open a command prompt as administrator.\n2. `CheckNetIsolation LoopbackExempt -a -n=\"microsoft.win32webviewhost_cw5n1h2txyewy\"` \n3. Open a command prompt as your user.\n4. `git clone https://github.com/day8/office-js-memory-leak`\n5. `cd office-js-memory-leak`\n6. `npm install`\n7. `npm start`\n8. Excel should open automatically.\n9. Select the 'Insert' tab in the Excel ribbon\n10. Click 'My Add-ins down arrow' (the down arrow menu on the right, NOT the button on the left)\n11. Under 'Developer Add-ins' click 'Content Add-in Memory Leak'\n12. If you get the error \"We can't open this add-in from localhost\" quit Excel, run `npm stop` and go to 7.\n13. If the Content Add-in loads successfully resize it so that you can see the 'Run' button.\n14. Open Windows Task Manager and observe the memory use of Excel\n15. Click the 'Run' button repeatedly.\n16. Observe the memory usage for Excel continuing to climb each time Run is clicked. \n![office-js 2020-03-20 13-44](https://user-images.githubusercontent.com/350450/77129910-a309a100-6aba-11ea-91b5-99abb5d4276f.gif)\n17. After clicking the button LOTS of times, notice how memory is just contnuing to rise unbounded\n18. Leave the app alone for 20 mins and notice that at some point the used memory returns to normal\n\n## Now look at the onclick handler\n\nWhen you click on that `Run` button, the [`onclick`](https://github.com/day8/office-js-memory-leak/blob/master/src/contentapp/contentapp.js#L16-L24) handler is [this minimal function](https://github.com/day8/office-js-memory-leak/blob/master/src/contentapp/contentapp.js#L16-L24) which calls `Excel.run` with the simplest batch function possible. \n\nNote: the more the batch function does with `context`, the more memory is leaked on each click of `Run`\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fday8%2Foffice-js-memory-leak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fday8%2Foffice-js-memory-leak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fday8%2Foffice-js-memory-leak/lists"}