cocos / cocos-engine

Cocos simplifies game creation and distribution with Cocos Creator, a free, open-source, cross-platform game engine. Empowering millions of developers to create high-performance, engaging 2D/3D games and instant web entertainment.
https://www.cocos.com/en/creator
Other
7.08k stars 1.82k forks source link

label组件char模式,drawcall快速异常增加问题 #17247

Open zhoujianbo0 opened 2 months ago

zhoujianbo0 commented 2 months ago

Cocos Creator version

3.8

System information

Windows10

Issue description

label组件char模式,drawcall快速异常增加问题,下面提供必现demo,点击开始十几秒就会疯狂增长DC

Relevant error log output

No response

Steps to reproduce

label组件char模式,drawcall快速异常增加问题

Minimal reproduction project

No response

qiuguohua commented 1 month ago

@zhoujianbo0 我测试并没有疯狂增长,是缓慢的增长,我看你的测试例,是不断增加label组件,是不断的增加渲染的顶点数量。我验证了web和windows平台。

zhoujianbo0 commented 2 weeks ago

@qiuguohua 会增长的,一次性创建80个label,每个label用同一个字符串,字符串长度三四十个中英文混杂。addchild上去之后,DC增长了20多。

zhoujianbo0 commented 2 weeks ago

@qiuguohua 大佬,麻烦优先给跟进下吧,这个问题不小的。不一定就是label的问题,可能是整个引擎的DC计算有问题的!!这会导致游戏的DC优化没有意义的。