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

put db/disk accesses into background thread? #109

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

yulin2
Copy link

@yulin2 yulin2 commented Oct 25, 2014

Hi, I'm doing research on performance for Android apps. I found some event handlers access db/disk from UI thread, but Android docs suggest us to avoid such blocking calls in UI thread. Do they lead to any responsiveness issues?

I tried to refactoring by putting them into background tasks (the refactoring also include synchronization to fix data races). Looking forward to see your comments.

Also synchronize initAppraiseTask to avoid data races.
line 310 make the Handler to run on UI thread.
@mjkohoh
Copy link
Contributor

mjkohoh commented Oct 26, 2014

@com360
Copy link
Contributor

com360 commented Nov 4, 2014

Thank you! You said is good, Android IO task not sugest do in UI thread.

@yulin2
Copy link
Author

yulin2 commented Nov 4, 2014

thanks for the confirmation. any comments about the pull request? do you wanna merge?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants