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

.top-social img 的 backdrop-filter属性会导致大量的gpu占用 #844

Closed
meng-luo opened this issue Jan 31, 2024 · 4 comments
Closed
Labels
enhancement New feature or request

Comments

@meng-luo
Copy link
Contributor

问题出处:

前端,封面社交区域

实际行为描述:

造成了大量gpu占用

复现步骤:

启用封面社交区域,社交网络图标选择第一个,回到首页,当显示封面区域时会占用大量gpu(风扇直接起飞,吃了3060 40%左右)

配置与环境:

截图(若有)

image
image

补充信息:
当注释掉backdrop-filter后gpu的占用正常

@meng-luo meng-luo added the bug Something isn't working label Jan 31, 2024
Copy link

@meng-luo,感谢你给 sakurairo 提出了 issue。ヾ(≧▽≦*)o
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@KotoriK
Copy link
Collaborator

KotoriK commented Feb 1, 2024

我们backdrop-filter是这样的,不过这个好像也有点过于离谱了,每个图标能占9.7MB的显存,全页面100M。
抽空看下有没有更好的方案优化

@KotoriK KotoriK added enhancement New feature or request and removed bug Something isn't working labels Feb 2, 2024
@KotoriK
Copy link
Collaborator

KotoriK commented Feb 29, 2024

涉事样式已经被瞳宝偷偷干掉了 54683d8
等到2.6.4就会更新了
全剧终

@KotoriK KotoriK closed this as completed Feb 29, 2024
@snowman
Copy link

snowman commented Mar 19, 2024

请教是如何定位到 backdrop-filter 的, 我这边应该是 js 的 问题

复现网址: https://blog.imoeq.com/利用爬虫多线程快速自动下载禁漫天堂/

进入网页后, 禁用 javascript 就不卡了

soQhvRlu7m

// not work, still high cpu
$$("*")
  .filter(e => {
    var filter = getComputedStyle(e)["backdrop-filter"]

    return filter != "none"
  })
  .map(e => {
    console.log("set backdropFilter to none:", e)
    e.style.backdropFilter = "none"
  })

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