Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 8C8CA200CEF for ; Mon, 4 Sep 2017 14:57:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8B085164E62; Mon, 4 Sep 2017 12:57:09 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id CEA5D164E5E for ; Mon, 4 Sep 2017 14:57:08 +0200 (CEST) Received: (qmail 48900 invoked by uid 500); 4 Sep 2017 12:57:06 -0000 Mailing-List: contact dev-help@weex.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@weex.incubator.apache.org Delivered-To: mailing list dev@weex.incubator.apache.org Received: (qmail 48888 invoked by uid 99); 4 Sep 2017 12:57:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Sep 2017 12:57:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id C60141A4F24 for ; Mon, 4 Sep 2017 12:57:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.63 X-Spam-Level: ** X-Spam-Status: No, score=2.63 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_IMAGE_RATIO_06=0.001, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 8xg-jkToh6qy for ; Mon, 4 Sep 2017 12:57:00 +0000 (UTC) Received: from mail-ua0-f170.google.com (mail-ua0-f170.google.com [209.85.217.170]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 4A2065F6C8 for ; Mon, 4 Sep 2017 12:57:00 +0000 (UTC) Received: by mail-ua0-f170.google.com with SMTP id g47so1152485uad.0 for ; Mon, 04 Sep 2017 05:57:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=czJEAhgxL8in+lNMfILmKIya1/dSDlDMgQZ7AMUmJCg=; b=OQ6vW1DwhkLoYAKcc/unigi5onHaiVYYSe5iT910P5zKq95qax10/PRjdukYWLJ7e2 I5wSIbFB1sXoUA/hvy1jf2dSMsvB2uUH5L8f7kMIKgV8+TMtdjzgkgz68QE6Vcl0s1u3 vnNROxEKluMzI2XP4GTyepWv0ViINc1XJbZK8Czr2nP88kc8ccUlSQnu76YCG9qKAWH9 NcvA+RGv/LptCo4KWUYbUDqfYpVJTA813XlS5LIptWb3W9G+2J6goheeNu72un/TKFIL nCSEXg0IEU00XmREFFbk+Xi+k9/vmy/Hi+BvmfmBGxoKjwEDZUAWivWMJnZeDgXnMBB7 IjAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=czJEAhgxL8in+lNMfILmKIya1/dSDlDMgQZ7AMUmJCg=; b=m4agjWE3jO4Zl/f3QWnAUJuYDNs3LlO/vQqu4XUPHUiZ6vMGIsJRkAUJj/qTo769d4 SiC+XCXrSM6fO8GFfGRTEHN2O6N6BSz7Fr3U25DgplgUJnzivK4obRJ2L2f0OD9ai/9t 51D+XlAX99Csf872OwNB7kOalO6pe7xlEnCU3u8YLpjDrQSUyLWK2S00fRSNv52FmYQZ YOcsw0jWwLWuWUuMD4mCt6SP7pChIQPJlgJz8yl/YI9l0Vg6SL/Btxb6cKFRto0KAViM M2TdVjFJjt6KMCpRIBcfOpswOVZ+U7Z6hNOo6Q3F2w6uQz/0dlydh5qSck3LuTa3cLmF h1Sg== X-Gm-Message-State: AHPjjUh6YQHjaylrIsOEBFTSrwAkFyf6UrXDZVXfDEYa58Pz4Ai9EtAk SWnywR2QsZ9psJyl6KDL9Mp+TInBQWta X-Google-Smtp-Source: ADKCNb4i0RWLV3vV3xcH5BGEITwjDUAK5SGjoQvew4WOjrzGRRx6LY1t8dSCc5ntnES823eKZ6BPev7PkLlnb+CE7hY= X-Received: by 10.176.18.98 with SMTP id s34mr269114uac.166.1504529818874; Mon, 04 Sep 2017 05:56:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.31.63.215 with HTTP; Mon, 4 Sep 2017 05:56:28 -0700 (PDT) In-Reply-To: References: From: shihan zheng Date: Mon, 4 Sep 2017 20:56:28 +0800 Message-ID: Subject: Re: Android memory holding in complex layout To: dev@weex.incubator.apache.org Content-Type: multipart/alternative; boundary="f403043664a6687a0605585ca52f" archived-at: Mon, 04 Sep 2017 12:57:09 -0000 --f403043664a6687a0605585ca52f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Chris: Thank you for your feedback . As you know=EF=BC=8CWeex needs to save t= he Dom tree to re-render the native view when scrolling up and down =EF=BC=9B We can easily reuse native view because of saving the Dom tree. As you suggest, serializing the Dom tree to sdcard may cause the scroll be not smooth, and it may be worse user experience. In your case, I suggest you can optimize to reuse the item in DSL=EF= =BC=8Cjust like HTML5 ' best practice of endless page; we will continue to research the best solution to resolve this problem, And if you have better idea , welcome to tell to us immediately . thank you ! 2017-09-04 12:24 GMT+08:00 chris chu : > 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, i= t > 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 50= MB > 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 i= s > 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 iss= ue > 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). > > > > =E2=80=8B > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > My Environment is: > Mac OS 10.12.5 > Android Studio 2.3, Gradle 2.3.3 / Android Studio 3.0 beta, Gradle 3.0 > =E2=80=8BNexus 6 Plus > Android 7.1.2 > weex sdk: 0.11.0 > > Sincerely Chris. > > --=20 Best Regards! --------------------- Shihan Zheng (Weex project team member ) --f403043664a6687a0605585ca52f--