Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

out of memory 如果长期不关闭 (内存持续增长) #782

Open
5 of 6 tasks
lovitus opened this issue Apr 16, 2024 · 5 comments
Open
5 of 6 tasks

out of memory 如果长期不关闭 (内存持续增长) #782

lovitus opened this issue Apr 16, 2024 · 5 comments
Labels
C: UI T: Bug Something isn't working
Milestone

Comments

@lovitus
Copy link

lovitus commented Apr 16, 2024

复现步骤 / Step to reproduce

开启程序, 放置一晚

预期行为 / Expected behaviour

能正常使用

实际行为 / Actual Behaviour

空白显示,有类似浏览器的 out of memory, 点击刷新后, 程序界面重载。

应用日志 / App logs

No response

备注 / Addition details

clash core 内存占用正常。
只是ui需要刷新。

Clash Nyanpasu 版本号 / Clash Nyanpasu

1.5.1

Clash 核心及其版本号 / Clash core and version

16fadd2 clash meta(mihomo) alpha

是否为 Pre-release / Is pre-release version

16fadd2

操作系统及版本 / OS version

windows 10

自查步骤 / Verify steps

  • 如果您有足够的时间和能力,并愿意为此提交 PR ,请勾上此复选框 / Pull request is welcome. Check this if you want to start a pull request
  • 您已知悉如果没有提供正确的系统信息,以及日记,您的 Issue 会直接被关闭 / You have known that if you don't provide correct system information and logs, your issue will be closed directly
  • 您已仔细查看并知情 Q&AFAQ 中的内容 / You have read and understood the contents of Q&A and FAQ.
  • 您已搜索过 Issue Tracker,没有找到类似内容 / I have searched on Issue Tracker, No duplicate or related open issue has been found
  • 您确保这个 Issue 只提及一个问题。如果您有多个问题报告,烦请发起多个 Issue / Ensure there is only one bug report in this issue. Please make mutiply issue for mutiply bugs
  • 您确保已使用最新 Pre-release 版本测试,并且该问题在最新 Pre-release 版本中并未解决 / This bug have not solved in latest Pre-release version
@lovitus lovitus added S: Untriaged T: Bug Something isn't working labels Apr 16, 2024
@lovitus
Copy link
Author

lovitus commented Apr 16, 2024

image
image

这是今天运行7个小时以后的内存使用

  • 设备里没有其它应用使用这个edgewebview2。
  • kill掉这个进程以后,只有 Nyanpasu是奔溃的,其它所有程序都是正常显示。

@lovitus lovitus changed the title out of memory 如果长期不关闭 out of memory 如果长期不关闭 (内存持续增长) Apr 16, 2024
@greenhat616
Copy link
Collaborator

得抽空做一下 profile,应该是之前哪里的 hooks 或者 inMemoryCache 泄露了

@greenhat616 greenhat616 added this to the 1.6.0 milestone Apr 16, 2024
@keiko233
Copy link
Collaborator

pre release已经修复,经过我们的长期测试现在内存占用不再爆炸,欢迎使用。

但是考虑到Windows webview的共享特性,如果再出现类似问题建议排查下其他使用webview的程序

@lovitus
Copy link
Author

lovitus commented May 29, 2024

! [image] (https://github.com/LibNyanpasu/clash-nyanpasu/assets/14361541/c65f9e42-c0e2-4027-88ed-faed0e47034f)

VER: 1.5.2 alpha a1f44fd + mihomo alpha

使用半小时后, 内存还是能到1G, kill掉edgewebview2后应用ui会奔溃,点击重载后内存使用恢复。
但是如果去选择节点然后最小化,内存又会增长起来 ,3-8M/s, 大概会停留在1.5G以下。

是否可能和我节点数量有关, 单个组可能有上百个节点, 有40+个组。
@keiko233 @greenhat616

@keiko233
Copy link
Collaborator

keiko233 commented May 29, 2024

! [image] (https://github.com/LibNyanpasu/clash-nyanpasu/assets/14361541/c65f9e42-c0e2-4027-88ed-faed0e47034f)

VER: 1.5.2 alpha a1f44fd + mihomo alpha

使用半小时后, 内存还是能到1G, kill掉edgewebview2后应用ui会奔溃,点击重载后内存使用恢复。 但是如果去选择节点然后最小化,内存又会增长起来 ,3-8M/s, 大概会停留在1.5G以下。

是否可能和我节点数量有关, 单个组可能有上百个节点, 有40+个组。 @keiko233 @greenhat616

滚动的地方我们都做了虚拟滚动条,理论上来说应该没有太大关系,有空的时候我再测试优化一下。

最小化这个问题可能和swr和memo有关,仍然需要排查一下。

结合我们的修改,初步判断与route transition似乎有点关系

@greenhat616 greenhat616 reopened this May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: UI T: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants