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

【性能优化】贴贴页面内存占用爆炸 #303

Open
wdpm opened this issue Oct 1, 2021 · 7 comments
Open

【性能优化】贴贴页面内存占用爆炸 #303

wdpm opened this issue Oct 1, 2021 · 7 comments
Labels
enhancement New feature or request

Comments

@wdpm
Copy link
Member

wdpm commented Oct 1, 2021

链接地址:https://vtbs.moe/tietie
该页面内存占用截图:177MB
Snipaste_2021-10-01_12-27-56
截图中 Object,Array,Closure都是几十万的数量级。就算是桌面App也不一定撑得住啊
粗略分析:该页面很久之前我就注意到了。猜测是直接将所有vtuber的data set加载进关系图?
@simon300000

@simon300000
Copy link
Member

simon300000 commented Oct 1, 2021

之前写这个页面的时候总共就几百个主播,谁能想到现在翻了10倍呢哈哈哈哈
我接下来会把ta变成一个在服务器生成的东西

@simon300000
Copy link
Member

你的电脑真的很不错,我的电脑打不开这玩意的hhhh

@wdpm
Copy link
Member Author

wdpm commented Oct 1, 2021

你的电脑真的很不错,我的电脑打不开这玩意的hhhh

@simon300000
Copy link
Member

哇哦 我现在打得开了
我只能归功于浏览器公司的性能优化(

@wdpm
Copy link
Member Author

wdpm commented Oct 1, 2021

说回正题吧。
这个页面数据量过大。目前是在浏览器端计算,如果你改成服务器那边计算,浏览器这边可以摆脱计算压力,但是依然存在显示的压力(指视图层)。这个显示的逻辑,估计要好好想一下。总体思路还是按需加载吧,全部数据集的话,缩放会卡成PPT的。

@wdpm wdpm added the enhancement New feature or request label Oct 1, 2021
@simon300000
Copy link
Member

我看看能不能变成svg(

@GongT
Copy link

GongT commented Jun 15, 2023

新电脑加载非常轻松,但是他这个缓动效果能卡死2分钟,然后就无比流畅

不知道能不能让他不要缓动,或者干脆不要任何动画

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants