vnote icon indicating copy to clipboard operation
vnote copied to clipboard

可能存在内存泄漏v2

Open pingplug opened this issue 3 years ago • 8 comments

Describe the bug A clear and concise description of what the bug is. 在仅打开一个文件时内存占用达到4GiB

To Reproduce Steps to reproduce the behavior:

  1. 打开一个有若干公式的文件
  2. 拆分窗口(两个窗口打开同一个文件),一个窗口阅读,另一个窗口编辑
  3. 在其中一个窗口编辑公式(此时另一个窗口会随着每一次键入字符刷新,即使没有保存)

Expected behavior A clear and concise description of what you expected to happen. 内存占用稳定,打开同一个文件的其他窗口仅在保存时刷新

Desktop (please complete the following information):

  • OS: Linux
  • Version 3.0.0-beta10

Additional context Add any other context about the problem here.

pingplug avatar Apr 22 '21 09:04 pingplug

Hi,

内存好像都被Qt QWebEngineProcess吃了,这个就是阅读模式用到的一个浏览器内核。这里我就不太好分析了,希望前端高手能attach上去debug一下看看怎么处理了。后面我会每十次刷新就直接刷新整个网页,释放掉一部分内存。另外,这个分割窗口不是这样用的呀,专门的双边预览模式后面会添加。

image

tamlok avatar Apr 22 '21 23:04 tamlok

也有可能是公式的缓存,我晚点再试试没有公式的文件反复刷新会如何。

tamlok avatar Apr 23 '21 00:04 tamlok

分屏主要因为是我有看上下文的需求,未编辑的窗口在编辑模式下也会疯狂刷新,尤其是公式在刷新的时候文本位置会变,所以切阅读模式了。

pingplug avatar Apr 27 '21 00:04 pingplug

只开一个浏览器看论文,VNote 打开还没写都感觉很卡 😢。

xioacd99 avatar Apr 03 '22 13:04 xioacd99

只开一个浏览器看论文,VNote 打开还没写都感觉很卡 😢。

不会吧。机器内存多少?

tamlok avatar Apr 03 '22 14:04 tamlok

感谢回复 🤞。 16 G 的 RAM,CPU i7-10510 1.80GHz, MX250 独显。 开一个 Edge 看论文,拖着 VNote 的窗口都会一顿一顿的。刚开始用 VNote 的前一个月没这种情况,不知道是不是我积累的文件太多了 😥?

xioacd99 avatar Apr 03 '22 14:04 xioacd99

文件多没啥关系。可以试试设置里面调一下opengl的选项。

tamlok avatar Apr 03 '22 17:04 tamlok

查看了一下 OpenGL 选项,发现原来选择的是无。试了 Desktop、OpenGL ES 和 Software 三个,发现更换到 OpenGL ES 就流畅地飞起了 🎉。

xioacd99 avatar Apr 03 '22 23:04 xioacd99