JxBrowser需要巨大的RAM [英] JxBrowser takes huge RAM

查看:544
本文介绍了JxBrowser需要巨大的RAM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用jxbrowser来创建一个自动化测试应用程序。

运行了很多自动化测试(登录到网页后,点击某个按钮,执行一些UI交互),我承认jxbroser-chromium.exe占用了如此巨大的内存,即使在做了一些自动化测试之后,我加载了about:blank页面

注意我使用浏览器和浏览器只有一个实例。 BrowserView



有没有什么方法可以清理和放大?清除内存时使用jxbrowser?



< img src =https://i.stack.imgur.com/D0Z5W.pngalt =在这里输入图片描述>

解决方案

JxBrowser基于Chromium引擎。铬引擎运行在jxbrowser-chromium.exe进程中。 JxBrowser在这个过程中不控制内存。所有内存管理都由Chromium引擎完成。如果您发现进程分配的内存太多,那么这意味着Chromium引擎决定分配这些内存。出于某些原因。



我相信如果您也这样做Google Chrome选项卡中的自动化测试,您会看到相同的内存使用问题。据我所知,没有Chromium API可以清除现有标签/浏览器的内存。要清除内存,我只能建议您处理浏览器实例并重新创建它。


I am using jxbrowser to make an automation test application.

After run a lot of automation tests(login to a webpage, click some button, perform some UI interaction), I reallize that the jxbroser-chromium.exe took so huge RAM, Even after doing some automation tests, I load "about:blank" page

Note that I use only one instance of Browser & BrowserView

Is there any way to clean & clear RAM when using jxbrowser?

解决方案

JxBrowser is based on Chromium engine. Chromium engine is running in the jxbrowser-chromium.exe process. JxBrowser doesn't control the memory in this process. All memory management is done by Chromium engine. If you see that the process allocates too much memory, then it means that Chromium engine decided to allocate this amount of memory for some reasons.

I believe if you do the same automated tests in Google Chrome tab, you will see the same memory usage issue. As far as I know there's no Chromium API that would clear the memory of an existing tab/browser. To clear the memory I can only suggest that you dispose Browser instance and create it again.

这篇关于JxBrowser需要巨大的RAM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆