Replies(2)

If it is very long, I would advise not using a listview. Just create your own CSS. It's not really that hard. You can typically create much more compact HTML (many hundreds of percent smaller) than generated by a listview, and it also isn't subject to the construction overhead of a listview.

A quickie alternative I have been using is to pre-render the listview. Create a listview, examine the CSS in Firebug or Web Inspector, and apply the CSS and expanded HTML you see directly. Remove the data-role="listview".

Keep in mind that you won't be able to refresh the list or use any of the listview API, because there is no listview. You are just borrowing the listview CSS.

You will also then see how painfully huge the HTML created by a listview is, and it should be obvious that it can be chopped-down drastically if you just use your own, more-targeted CSS. This will bring additional performance improvement.