You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by davidh87 <da...@confusedherring.com> on 2013/12/15 00:22:40 UTC

Efficient way to update ListView

Hi, 

Apologies for slight doublepost - I added this to the wrong subforum
previously.

As I understand it, the method of updating a listview via an Ajax call is to
add the listview's container to the AjaxRequestTarget. This is resulting in
the entire container being submitted back to the client. 

The site I'm working on has a panel listing all the users online, and we use
websockets to issue updates so that once a new player logs in, the update is
pushed to the client and the display is updated. 

This update is pushed out to all 200 users, so that the users online panel
is up-to-date. The update contains the entire panel of players, which is
pretty large in size (~80kB of markup). While this markup may be a little
large, the issue is that for every user logging in/out, we're doing (80kB *
200) of traffic from the server. With users logging in/out fairly
frequently, this gets to be an issue. 

Is there a more efficient way of wicket only updating/transmitting the items
in a ListView that have changed? setReuseItems(true) tells the server not to
re-render but the entire thing is submitted over Ajax still. 

I know there are ways we can get around this by having the Ajax update issue
some javascript to add/remove people, but that feels less "wicket-y"?



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Efficient-way-to-update-ListView-tp4663022.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Efficient way to update ListView

Posted by vineet semwal <vi...@gmail.com>.
try https://github.com/vineetsemwal/quickview
when you get time also read the below nice article

http://wicketinaction.com/2008/10/repainting-only-newly-created-repeater-items-via-ajax/


On Sun, Dec 15, 2013 at 4:52 AM, davidh87 <da...@confusedherring.com> wrote:

> Hi,
>
> Apologies for slight doublepost - I added this to the wrong subforum
> previously.
>
> As I understand it, the method of updating a listview via an Ajax call is
> to
> add the listview's container to the AjaxRequestTarget. This is resulting in
> the entire container being submitted back to the client.
>
> The site I'm working on has a panel listing all the users online, and we
> use
> websockets to issue updates so that once a new player logs in, the update
> is
> pushed to the client and the display is updated.
>
> This update is pushed out to all 200 users, so that the users online panel
> is up-to-date. The update contains the entire panel of players, which is
> pretty large in size (~80kB of markup). While this markup may be a little
> large, the issue is that for every user logging in/out, we're doing (80kB *
> 200) of traffic from the server. With users logging in/out fairly
> frequently, this gets to be an issue.
>
> Is there a more efficient way of wicket only updating/transmitting the
> items
> in a ListView that have changed? setReuseItems(true) tells the server not
> to
> re-render but the entire thing is submitted over Ajax still.
>
> I know there are ways we can get around this by having the Ajax update
> issue
> some javascript to add/remove people, but that feels less "wicket-y"?
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Efficient-way-to-update-ListView-tp4663022.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
thank you,

regards,
Vineet Semwal