Currently, long scrollable list more and more commonly used in mobile apps.
Many list even supports infinite scroll. It could be a disaster for
performance, especially for memory usage.

However, I found most items in the long list are have the same structure,
the only difference is the data. The number of list item templates are
countable and not many. I think it's a good idea to separate the "template"
and "data" in a list. Create different list item templates, and render them
driven by data. Only render nodes within the viewport (or an expand save
area), then recycle and reuse the inactive templates.

I know that there is already a recycling strategy in some native views, but
it's not enough. Native render engines still have to create a lot of
components, front-end frameworks still have to create a large virtual dom
tree of the list. I think a more progressive approach is to remove
the virtual dom tree of the list, front-end frameworks only need to send
the list data and templates to native render engines. Native render engines
decide which template should be rendered or recycled based on the data.

This feature Involved in many areas of Weex and may take great efforts to
achieve, but it will largely improves performance and optimizes memory
usage.

Looking forward to furthering discussions.

Best Regards, Hanks

Reply via email to