Bad performance with Guava Cache on Android

前端 未结 2 1436
心在旅途
心在旅途 2021-02-02 12:25

We use a loading Google Guava LoadingCache for bitmaps in an Android application. In the application I am running a drawing Thread, that paints the bitmaps in the cache to a Can

2条回答
  •  礼貌的吻别
    2021-02-02 13:07

    Android code is not always optimised the same way as it is in a JVM. What can perform very well in Java might not perform as well in Android. I suggest you write a very simple cache of your own. e.g. using LinkedHashMap.removeEldestEntry() and see how that goes.

提交回复
热议问题