简体   繁体   English

使用ydn-db遍历indexDb的最佳方法

[英]Best way to loop through indexDb using ydn-db

I'm using ydn-db as a shim for mobile dev but am experiencing some poor performance with IOS and record retrieval. 我将ydn-db用作移动开发人员的填充程序,但IOS和记录检索的性能却很差。

My question is, what is the best way to loop over a data store? 我的问题是,遍历数据存储的最佳方法是什么?

Right now I use 现在我用

db.values() and set the limit to the number of items in the list ( usually about 200, but it has a hard limit at 100 ) db.values()并将限制设置为列表中的项目数(通常约为200,但硬限制为100)

Anyhow was just wondering what the best way to go about looping over the results might be. 无论如何,只是想知道循环遍历结果的最佳方法是什么。

I have read the docs, and while they are extensive they are also confusing, hence why I'm posting here. 我已经阅读了这些文档,尽管它们内容广泛,但它们也令人困惑,因此,我为什么要在这里发布。

Anyhow, any help would be appreciated. 无论如何,任何帮助将不胜感激。

The best way to loop through is db.open . 最好的循环方法是db.open It iterate one record at a time and very memory efficient. 一次迭代一个记录,并且内存效率很高。

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

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