if you make a ajax request to replace the full list after each time  
the user reorders something in the list, you run the risk of the  
request taking longer to return from the server than you would  
expect. If the users makes another change, before the first response  
gets back from the server, then you have to requests pending. I have  
seen  it happen quite often  that those 2 requests do not come back  
in the same order they where sent, hence your list gets out of sync  
with what the user is doing..

ie:
drag one
ajax request one sent
drag two
ajax request two sent
ajax request two response received
ajax request one response received

Also I could see a serious problem if your list is updated with new  
HTML while you are in the middle of dragging something to change its  
order.

I am not sure (from what you have said) why you would need to have  
the response replace the HTML of the list after drag? in the simple  
case of one order change, you send the new order off to the server.  
Now the server knows (sees) what the user sees in terms of the  
order.. The html that your response sends back would be the same as  
what the user sees as the sortable already changed the HTML... Unless  
you are updating/ changing other information in the list server side...


______________________________________________________________________
Alex Duffield ❖ Principal ❖ InControl Solutions . http:// 
www.incontrolsolutions.com



On 3-Oct-07, at 6:00 AM, Schmitty wrote:

>
> We  are using Script.aculos.us for a quoting application.  Some of the
> quotes can contain many line items.  We allow the users to group line
> items and are using sortables and drag and drop to allow the users to
> sort within a group and across groups.  However, it seems when we
> reach about 100 line items performance start to degrade.
>
> Also, after the user drags an item we make an Ajax call to update the
> sort order and persist it.  The Ajax call returns the HTML to replace
> the entire list/groups of items.  When there is about a 100 items the
> display is not refreshed correctly.  It seems that perhaps the Ajax
> returned HTML might be replacing a portion of the DOM that
> Script.aculos.us/prototype is still processing.
>
> Any suggestions on how to improve performance?
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to