如何减少phantomjs内存消耗?
我使用 phantomjs 和 casperjs 来运行多个测试,看起来 PhantomJS 的每个实例都占用约 106M 的 RAM。可以减少这个数额吗?有没有一种简单的方法可以在多个“选项卡”中运行测试?
I'm using phantomjs with casperjs to run multiple tests and it looks like each instance of PhantomJS takes ~106M of RAM. Is it possible to reduce that amount? Is there a simple way to run tests in multiple "tabs"?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
编辑: 正如@newfurniturey 所指出的,release 现已弃用。我们必须使用close:
http://phantomjs.org/api/webpage/method/close.html
不知道这是否有帮助,但是 release 函数可能是一个很好的尾巴:
http://phantomjs.org/api/webpage/method/release.html
:)
Edit: As pointed by @newfurniturey, release is now deprecated. We must use close:
http://phantomjs.org/api/webpage/method/close.html
Don't know if that helps, but the release function could be a good tail :
http://phantomjs.org/api/webpage/method/release.html
:)