svga / SVGAPlayer-Web

Similar to Lottie. Render After Effects / Animate CC (Flash) animations natively on Android and iOS, Web. 使用 SVGAPlayer 在 Android、iOS、Web中播放 After Effects / Animate CC (Flash) 动画。
https://svga.io
Apache License 2.0
954 stars 239 forks source link

Memory issues after using a small svga #87

Open zengkan0703 opened 4 years ago

zengkan0703 commented 4 years ago

We have a svga-file at work, I check the svga with svga-online-player and it’s memory is very fine(0.7M), but when I use it at my project, the page memory is increased by dozens of MB, I want to know what went wrong.

Here are the information about this svga-file from svga-online-player

{
  "version": "2.0",
  "FPS": 30,
  "frames": 90,
  "videoSize": {
    "width": 1500,
    "height": 1624
  }
}
内存占用:0.7 M
img_249 --- {"width":186,"height":116}
img_250 --- {"width":186,"height":116}
img_251 --- {"width":186,"height":116}
img_252 --- {"width":186,"height":116}
img_253 --- {"width":186,"height":116}
img_254 --- {"width":186,"height":116}
img_392 --- {"width":50,"height":54}
img_393 --- {"width":50,"height":54}
img_394 --- {"width":50,"height":54}
img_395 --- {"width":50,"height":54}
img_461 --- {"width":41,"height":50}
img_462 --- {"width":41,"height":50}
img_463 --- {"width":41,"height":50}
img_464 --- {"width":41,"height":50}
shenzi --- {"width":153,"height":224}

This is the svga-file 1575884910782-mhzy3d (1).svga.zip

Thanks, have a nice day.

PonyCui commented 4 years ago

Can you provide a demo? And how much memory used?

zengkan0703 commented 4 years ago

Sorry, I have been busy some time ago. Here is the demo link, https://www.wulihub.com.cn/go/WwbNyq/index.html. Open the Developer tools --> More tools --> Performance monitor to view the JS heap. image The page memory is increased by dozens of MB, but I check the svga with svga-online-player and it’s memory is very fine(0.7M) .

So I want to know what went wrong. Thanks again, Happy New Year.