{"id":21156901,"url":"https://github.com/lkiarest/avalon-performance","last_synced_at":"2026-02-06T23:31:13.743Z","repository":{"id":149611113,"uuid":"42099018","full_name":"lkiarest/avalon-performance","owner":"lkiarest","description":"avalon性能问题总结","archived":false,"fork":false,"pushed_at":"2015-09-08T12:26:51.000Z","size":536,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-22T10:44:14.159Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lkiarest.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":"2015-09-08T08:12:19.000Z","updated_at":"2015-09-08T08:12:19.000Z","dependencies_parsed_at":"2023-04-07T06:57:07.780Z","dependency_job_id":null,"html_url":"https://github.com/lkiarest/avalon-performance","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lkiarest/avalon-performance","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkiarest%2Favalon-performance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkiarest%2Favalon-performance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkiarest%2Favalon-performance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkiarest%2Favalon-performance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lkiarest","download_url":"https://codeload.github.com/lkiarest/avalon-performance/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkiarest%2Favalon-performance/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29180348,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T23:15:33.022Z","status":"ssl_error","status_checked_at":"2026-02-06T23:15:09.128Z","response_time":59,"last_error":"SSL_read: 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-20T11:54:56.834Z","updated_at":"2026-02-06T23:31:13.727Z","avatar_url":"https://github.com/lkiarest.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# avalon-performance\navalon性能问题总结\n\n__基于avalon 1.4.6研究__\n\n在使用avalonjs框架的过程中发现经常会有内存泄漏的情况发生，将最近优化的一些方法总结一下\n\n### 1. 使用mmstate切换页面时候发生的内存泄漏\n\n[测试页面](http://lkiarest.github.io/oniui-extend/#!/duplexDemo)\n```\n使用mmstate路由，测试页面2基本就是一个空的只显示一个字符串，测试页面1里面放几个input，使用ms-duplex绑定到vm的属性。\n在页面1和2之间切换的时候发现内存会一直增长不会释放。\n使用chrome调试的话会发现avalon.$$subscribers这个数组里的元素会持续增加\n经过司徒大神修改之后的版本解决了直接属性泄漏的问题，不过在使用对象或者数组的时候这个还是会有内存泄漏\n```\n\n###### 解决方法：\n\n1. onload的时候重新设置对象(=)和数组(pushArray)的值，**空对象也需要重新设置**\n1. unload的时候调数组的clear方法或者置为\"[]\"，(对象不用清除)\n\n**使用以上方法之后发现在widget(比如dialog widget标签内的html)里面使用的数组还是不会被释放，待研究**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flkiarest%2Favalon-performance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flkiarest%2Favalon-performance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flkiarest%2Favalon-performance/lists"}