Is there a faster way to decode html characters to a string than Html.fromHtml()?

后端 未结 6 1160
轻奢々
轻奢々 2020-12-02 17:24

I am using Html.fromHtml(STRING).toString() to convert a string that may or may not have html and/or html entities in it, to a plain text string.

This is pretty slow

6条回答
  •  情歌与酒
    2020-12-02 18:12

    With a large batch of these it can add over a minute

    Any parsing will take some time. 22ms seems to me like fast. Anyway, can you do it in background? Can help you some kind of caching?

提交回复
热议问题