nolanlawson / Catlog

Logcat-reading app for Android (UNMAINTAINED)

Home Page:http://nolanlawson.com/apps#catlog

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Put invocation to "findFilterItems" into AsyncTask in LogcatActivity.java?

yulin2 opened this issue · comments

Hi developers of Catlog,

I'm a Ph.D. student and I'm doing research on improving performance
for Android apps.

In Catlog, "CatlogDBHelper.findFilterItems" accesses database,
so you put the invocation of this method into AsyncTask at line 593 of
LogcatActivity.java ("showFiltersDialog" method) to improve
responsiveness.

But there are two other places in LogcatActivity.java where you still
invoke "CatlogDBHelper.findFilterItems" in UI thread.
"addFiltersToSuggestions" calls "findFilterItems" at line 186 and it's
eventually called by two "onPreExecute" methods at line 1906 and 1290.
"onPreExecute" is executed by UI thread.

Why don't you also put all invocations to "findFilterItems" into background
thread? Is there any specific reason?

Thanks,
Yu

Hi Yu,

These all sound like great suggestions, and I would happily welcome a pull request. :)

I provide a pull request for this case.