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

Bug: V5 项目无操作时cpu 占用比较高, 像后台在运行什么吗? #5318

Open
5 tasks done
wangz-code opened this issue Jan 7, 2025 · 5 comments
Open
5 tasks done

Comments

@wangz-code
Copy link

Version

Vben Admin V5

Describe the bug?

类似其他的项目如果无操作 一般不会有这么高的占用
image

Reproduction

官网项目

System Info

System:
    OS: macOS 14.5
    CPU: (8) arm64 Apple M1
    Memory: 161.23 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.16.0 - ~/.nvm/versions/node/v20.16.0/bin/node
    npm: 10.8.1 - ~/.nvm/versions/node/v20.16.0/bin/npm
    pnpm: 9.12.3 - ~/Library/pnpm/pnpm
    Watchman: 2024.04.15.00 - /opt/homebrew/bin/watchman
  Browsers:
    Chrome: 131.0.6778.205
    Edge: 89.0.774.77
    Safari: 17.5

Relevant log output

No response

Validations

@zhaokjun
Copy link

zhaokjun commented Jan 7, 2025

打开浏览器的性能监视器,貌似是dom和样式一直在重绘,其他网页如果不动,样式重新计算次数一直是0
image

@zhaokjun
Copy link

zhaokjun commented Jan 7, 2025

image
好像是百度的统计js一直有个定时器……不知道去除后是不是就正常了,可以试试……
image

@wangz-code
Copy link
Author

image 好像是百度的统计js一直有个定时器……不知道去除后是不是就正常了,可以试试…… image

我把百度统计去掉了, build 之后 dom节点 还是在不停的变化 现在是 2.5% ~ 3% 徘徊

@wangz-code
Copy link
Author

22.mp4

这里有个看不到的动画一直在转, 不确定是不是这个

@wangz-code
Copy link
Author

wangz-code commented Jan 7, 2025

22.mp4
这里有个看不到的动画一直在转, 不确定是不是这个

应该就是这里, 把这个文件样式注释了
/vue-vben-admin/packages/@core/ui-kit/shadcn-ui/src/components/spinner/spinner.vue

之后 cpu 占用稳定就是 0.1% 了 dom数量也不再变化了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants