I have a so-called chat viewer, which basically consists of repeat.for , which repeat.for over all the messages and displays the message views using <compose> .
The problem is that it becomes quite slow when the number of messages exceeds 50, and the user moves between chats (which starts the repeat.for update when replacing a dataset in a virtual machine).
I feel like I'm doing something wrong with regard to handling this kind. Can I get information about other alternatives?
I tried UI virtualization, but, unfortunately, the current plugin does not offer support for the functions I need (elements of variable height, alignment from bottom to top).
I also made quite a few optimizations regarding bindings, most of them are one-time, and dataset updates will debut. But this did not improve the situation, since the main bottleneck is the initial load (linking views for the first time).
Thanks!
An example of the current approach:
<li repeat.for="message of chat.messages"> <compose view-model.bind="getMessageViewFromMessage(message) & oneTime" model.bind="message & oneTime" containerless> </compose> </li>
Travo source share