久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <small id='IX1j8'></small><noframes id='IX1j8'>

  • <legend id='IX1j8'><style id='IX1j8'><dir id='IX1j8'><q id='IX1j8'></q></dir></style></legend>
      <bdo id='IX1j8'></bdo><ul id='IX1j8'></ul>
    1. <tfoot id='IX1j8'></tfoot>
      <i id='IX1j8'><tr id='IX1j8'><dt id='IX1j8'><q id='IX1j8'><span id='IX1j8'><b id='IX1j8'><form id='IX1j8'><ins id='IX1j8'></ins><ul id='IX1j8'></ul><sub id='IX1j8'></sub></form><legend id='IX1j8'></legend><bdo id='IX1j8'><pre id='IX1j8'><center id='IX1j8'></center></pre></bdo></b><th id='IX1j8'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='IX1j8'><tfoot id='IX1j8'></tfoot><dl id='IX1j8'><fieldset id='IX1j8'></fieldset></dl></div>

        在 Google Chrome 中強制進行垃圾收集

        Forcing garbage collection in Google Chrome(在 Google Chrome 中強制進行垃圾收集)

        <tfoot id='5qSMy'></tfoot>
          <bdo id='5qSMy'></bdo><ul id='5qSMy'></ul>

          <small id='5qSMy'></small><noframes id='5qSMy'>

          <i id='5qSMy'><tr id='5qSMy'><dt id='5qSMy'><q id='5qSMy'><span id='5qSMy'><b id='5qSMy'><form id='5qSMy'><ins id='5qSMy'></ins><ul id='5qSMy'></ul><sub id='5qSMy'></sub></form><legend id='5qSMy'></legend><bdo id='5qSMy'><pre id='5qSMy'><center id='5qSMy'></center></pre></bdo></b><th id='5qSMy'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='5qSMy'><tfoot id='5qSMy'></tfoot><dl id='5qSMy'><fieldset id='5qSMy'></fieldset></dl></div>
              <tbody id='5qSMy'></tbody>

                • <legend id='5qSMy'><style id='5qSMy'><dir id='5qSMy'><q id='5qSMy'></q></dir></style></legend>
                • 本文介紹了在 Google Chrome 中強制進行垃圾收集的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我們正在開發一個帶有 ZK 的單頁網絡應用程序,它不斷與服務器通信并更新部分屏幕.更新頻率可達 1 秒.在這些更新期間,對大量 JS 對象的引用會丟失,這些對象最終必須由垃圾收集器清理.

                  We are developing a single-page web app with ZK which constantly communicates with server and updates parts of its screens. Updating can be as frequent as 1s. During these updates, references to large ammounts of JS objects are lost and those objects have to be cleaned by garbage collector eventually.

                  據我們所知,Chrome 僅在非活動標簽上運行其垃圾收集器.這對我們來說是個問題,因為應用程序的選項卡通常是活動的并且幾乎從不刷新,因此 JS 對象永遠不會被收集.如果保持活動狀態足夠長的時間,該選項卡最終會崩潰(Aww Snap 消息).

                  As far as we've figured out, Chrome only runs its garbage collector on inactive tabs. This is a problem for us, because the app's tab is usually active and almost never refreshed, thus JS objects never get collected. If left active for enough time, the tab eventually crashes (Aww Snap message).

                  我們需要手動啟動垃圾回收.到目前為止,我們已經嘗試使用 --js-flags="--expose-gc" 運行 Chrome 并運行 gc(),但它會引發異常:

                  We need to initiate garbage collection manually. So far we've tried running Chrome with --js-flags="--expose-gc" and running gc(), but it throws an exception:

                  ReferenceError: gc is not defined
                  

                  這在 Firefox 上不會發生——內存使用或多或少是一個常數.

                  This doesn't happen on Firefox -- memory usage is more or less a constant.

                  不能強制刷新頁面.

                  我們將不勝感激.

                  EDIT:我們已經嘗試在 Chrome 版本 23.0.1271.97 上運行 window.gc()gc()m25.0.1364.2 dev-m

                  EDIT: we've tried running window.gc() and gc() both on Chrome versions 23.0.1271.97 m and 25.0.1364.2 dev-m

                  推薦答案

                  你可以獲取 Chrome Dev Tools 的代碼,修改它,讓 ProfilerAgent.collectGarbage(); 時不時地被調用(它是當您單擊時間軸面板上的收集垃圾"按鈕時調用的代碼)并使用您的 DevTools 版本使用 --debug-devtools-frontend 標志運行 Chrome.

                  You can fetch code of Chrome Dev Tools, modify it so that ProfilerAgent.collectGarbage(); is called every now and then (it's a code that is called when you click 'Collect Garbage' button on the Timeline panel) and run Chrome with your version of DevTools using --debug-devtools-frontend flag.

                  但是,這個解決方案非常極端,只有在你真的絕望時才嘗試.到那時,我建議分析您的應用程序并檢查為什么 v8 決定不清理垃圾(或無法清理垃圾).DevTools 的時間線面板將幫助您解決這個問題.首先檢查此面板底部的收集垃圾"按鈕是否真的有效,如果沒有 - 你可能有內存泄漏(至少,根據 v8).如果是這樣,請嘗試 leak-finder-for-javascript.

                  However, this solution is quite extreme, try it only when you get really desperate. Till then, I propose profiling your application and checking out why v8 decides not to clean the garbage (or can't clean the garbage). Timeline panel of DevTools will help you out with this. Start with checking if 'Collect Garbage' button at the bottom of this panel really does its job, if not - you probably have a memory leak (at least, according to v8). If so, try leak-finder-for-javascript.

                  [EDIT] 我刪除了有關 chrome 擴展的信息,結果發現 --js-flags 時可以從網頁代碼中調用 gc()="--expose-gc" 被使用.至少在我的 23.0.1271.64 上.

                  [EDIT] I removed info about chrome extension, as it turns out that gc() can be called from webpage code when --js-flags="--expose-gc" is used. At least on my 23.0.1271.64.

                  這篇關于在 Google Chrome 中強制進行垃圾收集的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調用 abort (jQuery) 之后,瀏覽器也會等待 ajax 調用完成)
                  JavaScript innerHTML is not working for IE?(JavaScript innerHTML 不適用于 IE?)
                  XMLHttpRequest cannot load, No #39;Access-Control-Allow-Origin#39; header is present on the requested resource(XMLHttpRequest 無法加載,請求的資源上不存在“Access-Control-Allow-Origin標頭) - IT屋-程序員軟件開發技術分
                  Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 請求是否有可能不遵循重定向 (301 302))
                  XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分內容)
                  Restrictions of XMLHttpRequest#39;s getResponseHeader()?(XMLHttpRequest 的 getResponseHeader() 的限制?)
                  1. <small id='CtJfx'></small><noframes id='CtJfx'>

                      <i id='CtJfx'><tr id='CtJfx'><dt id='CtJfx'><q id='CtJfx'><span id='CtJfx'><b id='CtJfx'><form id='CtJfx'><ins id='CtJfx'></ins><ul id='CtJfx'></ul><sub id='CtJfx'></sub></form><legend id='CtJfx'></legend><bdo id='CtJfx'><pre id='CtJfx'><center id='CtJfx'></center></pre></bdo></b><th id='CtJfx'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='CtJfx'><tfoot id='CtJfx'></tfoot><dl id='CtJfx'><fieldset id='CtJfx'></fieldset></dl></div>

                          <bdo id='CtJfx'></bdo><ul id='CtJfx'></ul>

                        • <tfoot id='CtJfx'></tfoot>

                            <legend id='CtJfx'><style id='CtJfx'><dir id='CtJfx'><q id='CtJfx'></q></dir></style></legend>
                              <tbody id='CtJfx'></tbody>
                            主站蜘蛛池模板: 亚洲视频三区 | 久久88 | www日本在线播放 | 香蕉视频黄色 | 97综合在线 | 欧美大片久久久 | 欧美一区二区 | 国产在线a | 国产精品免费一区二区三区四区 | 日本高清中文字幕 | 最新日韩在线视频 | 福利一区在线观看 | 国产在线激情视频 | 国产成人免费视频网站视频社区 | 狠狠亚洲 | 人人做人人澡人人爽欧美 | 亚洲精品区 | 欧美bondage紧缚视频 | 国产二区视频 | 国产日韩一区 | 精品久久久久久亚洲综合网 | 国产综合精品一区二区三区 | 国产一区二区a | 天天操天天摸天天爽 | 日韩成人在线视频 | 久久久久久久久久久久91 | 亚洲美女一区二区三区 | 久久婷婷香蕉热狠狠综合 | 99视频在线免费观看 | 亚洲色在线视频 | 天堂一区二区三区四区 | 久久久久久国 | 亚洲字幕在线观看 | 亚洲精选一区 | 一级黄色片美国 | 国产精品99久久久久 | 日本在线看 | 国产一区二区在线免费观看 | 二区亚洲| 一区二区免费 | 成人不卡 |