AsyncTask, must it take such a performance penalty hit…?

后端 未结 4 1939
借酒劲吻你
借酒劲吻你 2020-11-29 02:59

I\'m developing a small app that reads in specific html-pages, re-formats them and then shows them in a WebView. If I run my code in the GUI thread, the performance hit is c

4条回答
  •  星月不相逢
    2020-11-29 03:38

    Despite the performance hit, you do want to do this in the background. Play nice, and others will play nice with you.

    Since I don't know what this is for, I can't suggest an alternative. My first reaction was that it's odd that you're trying to reformat HTML on a phone device. It's a phone, not a quad-core with oodles of RAM. Is it possible to do the reformatting in a web service and display the result on the phone?

提交回复
热议问题