简体   繁体   English

在 flutter 中处理大文件的最佳方法是什么?

[英]What is the best way to handle large files in flutter?

I have a some very large files (some over 20k lines) containing a list of data.我有一些包含数据列表的非常大的文件(一些超过 20k 行)。 However when trying to build the appbundle, flutter keeps giving an out of memory error.但是,在尝试构建 appbundle 时,flutter 不断给出 memory 错误。 I've noticed the issue occurs when a file is greater then 25k lines or if the lib folder is greater then 10MB.我注意到当文件大于 25k 行或 lib 文件夹大于 10MB 时会出现此问题。

I know I have enough ram as I have 2 computers (one with 16GB of ram and the other with 32GB) and upon removing a couple files it will build with 16GB of ram.我知道我有足够的内存,因为我有 2 台计算机(一台有 16GB 内存,另一台有 32GB),删除几个文件后,它将用 16GB 内存构建。

What is the best way to handle these large files so that I can build the appbundle without getting this error?处理这些大文件的最佳方法是什么,以便我可以构建 appbundle 而不会出现此错误?

For Out of memory, It's works for me.对于 memory,它对我有用。

android >> gradle.properties android >> gradle.properties

org.gradle.jvmargs=-Xmx1536M to org.gradle.jvmargs=-Xmx2048M org.gradle.jvmargs=-Xmx1536Morg.gradle.jvmargs=-Xmx2048M

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM