gpt4 book ai didi

flutter - 有关 Assets 影响绩效的问题

转载 作者:行者123 更新时间:2023-12-03 04:42:59 25 4
gpt4 key购买 nike

我希望你玩得开心。我目前正在开发具有很多图像的应用程序,因此我们自然将它们添加到/assets文件夹中。我的问题是。拥有大量 Assets 图片(约140张图片)会影响抖动的运行时性能。感谢您的回答。

最佳答案

基于Flutter文档中的this part有关性能的信息:

Flutter’s engine runtime and your application’s compiled Dart code areboth bundled as shared libraries on Android and iOS. The first step ofloading Flutter is to find those resources in your .apk/.ipa/.app(along with other Flutter assets such as images, fonts, and JIT codeif applicable).

This happens when you construct a FlutterEngine for the first time onboth Android and iOS APIs.


因此,它在启动应用程序时会有一些(可能很小)影响,但是只有使用 DevTools或类似的插件才能测量出资源量较少的 bundle 包与资源更多的 bundle 包之间的确切时间。

关于flutter - 有关 Assets 影响绩效的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62837823/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com