Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

数据库打开和关闭都相当耗时, 应该全局打开连接 #10

Closed
Jayin opened this issue May 20, 2014 · 1 comment
Closed
Labels

Comments

@Jayin
Copy link
Owner

Jayin commented May 20, 2014

数据库频繁打开/关闭操作的时候会导致主线程会卡顿
android文档也说了这是耗时操作

@Jayin Jayin added the to-do label May 20, 2014
@Jayin
Copy link
Owner Author

Jayin commented Jun 6, 2014

貌似这样加了,又得在Application哪里添加,与开发原则(KISS)相违背!
那解决办法是提供异步操作,小量的时候这样做挺好的,比如1-10个左右的数据插入/删除,如果多了,用批量删除/插入

@Jayin Jayin closed this as completed in 1b11d1a Jun 7, 2014
@Jayin Jayin reopened this Jun 7, 2014
@Jayin Jayin closed this as completed in 8dcf038 Jun 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant