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

Path 使用过多会导致内存暴涨 #12

Open
errnull opened this issue Dec 26, 2019 · 0 comments
Open

Path 使用过多会导致内存暴涨 #12

errnull opened this issue Dec 26, 2019 · 0 comments

Comments

@errnull
Copy link
Contributor

errnull commented Dec 26, 2019

在某些手机,svga中有使用Path路径绘制的shape动画的,svga会在绘制动画的过程中,动态的生成各种path来绘制shape动画,60帧的动画,可能最后会生成几千个参数不同的path对象,数量有可能更多,由于硬件加速的实现问题,path的参数稍有不同,某些手机会为每一个不同path绘制分配一块新的内存绘制,从而导致动画一直进行的话,分配的内存会一直持续增长,在le max 2这个手机上实验,demo里面加载会增长到300M,我们现在是让设计不使用shape动画来解决的

可以优化一下drawShape里面的path transform的计算

party_feed_live_entrance.svga.zip

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

No branches or pull requests

1 participant