weex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chris chu <chax...@gmail.com>
Subject Android memory holding in complex layout
Date Mon, 04 Sep 2017 04:24:49 GMT
Hi, Weex Team:

    On Android, I found my Java heap kept growing(from 50MB to 120MB), when
I scroll a complex layout in "WXListComponent". In this weex page, it
contains about hundreds of list items, and ten components in each list
item, including image component. The Java Heap memory won't go down to 50MB
until I close weex page.
    Then I dumped Java heap when it was 120MB. It turns out that:
    There are 217874 object which are belong to com.taobao.weex in Java
Heap, Shallow Size is 14436604, Retained Size is 70853332.
    There are 15808 WXDomObject, Shallow Size is 1644032, Retained Size is
11075192.

     I understand how Weex work, and in some way, this memory holding is
inevitable. I just wonder if Weex Team will optimize this performance issue
in Android.
     Such as: Caching Dom Tree in sd card, or doing reusing work in Dom
Layer like RecyclerView (only native view reuse is not good enough).



​

     ====================================

My Environment is:
Mac OS 10.12.5
Android Studio 2.3, Gradle 2.3.3 / Android Studio 3.0 beta, Gradle 3.0
​Nexus 6 Plus
Android 7.1.2
weex sdk: 0.11.0

      Sincerely Chris.

Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message