Appending instead of rendering in Spine.list

35 views
Skip to first unread message

kalin ringkvist

unread,
Apr 19, 2012, 7:40:50 PM4/19/12
to spi...@googlegroups.com
I'm building a chat application using Spine and found Spine.list to be an almost perfect solution for the display. However, it seems to be re-rendering the entire list every time a new message is added, which can be rather inefficient if we have a couple thousand messages with new ones coming in a couple times a second. Is there a good way to rework things so that it merely adds a new element to the end of the list instead of re-rendering the entire list?

Axel Nitzschner

unread,
Apr 20, 2012, 6:15:39 AM4/20/12
to spi...@googlegroups.com
I think I solved this by binding my 'refresh' event to something like
renderAll and my 'change' event to a different render method. There
I'm testing for the 'mode' argument which could be 'create', 'update'
or 'destroy'. You should then be modulating your DOM respectively.
Reply all
Reply to author
Forward
0 new messages