Buj*_*uju 1 database windows-phone-7
我想知道什么是Windows Phone 7上本地存储的可行数据库解决方案.使用搜索我偶然发现了这两个线程,但它们已经有几个月了.我想知道WP7的数据库是否有一些新的开发.我没有找到任何关于下面链接中提到的数据库的评论.
我的要求是:
编辑:
刚刚尝试使用一个简单的测试应用程序Sterling:它看起来不错,但我有2个问题.
使用创建1000条记录需要30秒db.Save(myPerson)
.Person是一个简单的类,有5个属性.
然后我发现有一种db.SaveAsync<Person>(IList)
方法.这很好,因为它不再阻止当前线程.
但我的问题是:是否保存db.Flush()
立即呼叫并对当前正在保存的IList进行查询?(因为在同步模式下保存记录最多需要30秒).或者我必须等到BackgroundWorker完成保存?
使用LINQ和where子句查询这1000条记录,第一次需要14秒才能加载到内存中.
有没有办法加快速度?
以下是一些基准测试结果:(单元测试在HTC Trophy上执行)
----------------------------- purging: 7,59 sec creating 1000 records: 0,006 sec saving 1000 records: 32,374 sec flushing 1000 records: 0,07 sec ----------------------------- //async creating 1000 records: 0,04 sec saving 1000 records: 0,004 sec flushing 1000 records: 0 sec ----------------------------- //get all keys persons list count = 1000 (0,007) ----------------------------- //get all persons with a where clause persons list with query count = 26 (14,241) ----------------------------- //update 1 property of 1 record + save persons list with query count = 26 (0,003s) db saved (0,072s)