简体   繁体   English

将数据存储在数组中好吗?

[英]Is it good to store data in array?

I start making Quiz game, I have 700 question Quiz problems to store in my app,So i store all of my Quiz question in Array it work fine but it is good to store my Quiz Question in array?我开始制作测验游戏,我有 700 个问题测验问题要存储在我的应用程序中,所以我将所有测验问题存储在数组中,它工作正常,但是将我的测验问题存储在数组中很好吗? or Should I use database?还是我应该使用数据库?

As many have stated in the comments, if it is working fine, why to worry.正如许多人在评论中所说,如果它工作正常,为什么要担心。 However, if in some devices loading that much data is a problem I would suggest two options.但是,如果在某些设备中加载那么多数据是一个问题,我会建议两个选项。

  1. Proceed as explained here ( https://stackoverflow.com/a/34478067/9415337 ).按照此处的说明进行操作 ( https://stackoverflow.com/a/34478067/9415337 )。

  2. Load the data/create the array asynchronously and, when finished, remove the loading bar/... and start.异步加载数据/创建数组,完成后,移除加载条/...并开始。

Hope it helps!希望能帮助到你!

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

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