如何减少在Android中存储数据所需的时间? [英] how to reduce the time needed for storing the data in android?

查看:118
本文介绍了如何减少在Android中存储数据所需的时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题描述:

表中有3列和3000行


用于插入3000行,我们使用for循环3000次以在表中插入记录...

第一次在Android设备上安装应用程序时,需要4到5分钟才能从sqlite数据库加载数据....

description of question:

There are 3 columns and 3000 rows in table


for inserting 3000 rows we use for loop for 3000 times to insert record in the table...

first time application is install in android device it taks 4 to 5 min to load data from the sqlite database....

推荐答案

简单:不存储它们,将它们保存在内存中(我知道这是一个愚蠢的答案,但是您质疑愚蠢的).

您应该详细说明问题,解释完整的要求(例如,什么样的数据,数据量等),当前如何存储它们(您可能应该发布相关代码)和为什么您发现它运行缓慢.
此外,请从您的请求中删除"urgentz"要求(请先阅读常见问题解答,然后再发布).
Simple: don''t store them, keep them in memory (I know it is a dumb answer, but you question is dumb).

You should elaborate your question, explaining full requirements (e.g. what kind of data, the amount of, etc..), how are you storing them at the moment (you should probably post the relevant code) and why you find it slow.
Moreover, please, remove the ''urgentz'' requirement from your request (please read the FAQ, before posting again).


这篇关于如何减少在Android中存储数据所需的时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆