Hi,

The first thing to try is to simplify the output HTML, 1MB for 200 entries is 
about 5k/entry, I would qualify this as HUGE for a table row...

Having some javascript parsed and executed on each row is a rendering killer. 
Just creating a function outside the update container and call it for each row 
with some required parameter should help a lot and reduce the size of the HTML 
(double win).

After if the result are still not satisfying, identify if the time is from the 
web app, the network transfer or the browser rendering.

The best solution for fast response time is a javascript app that would append 
row to the table and call some Ajax function to send the info to the server. 
This can be a big task and the problem is to make sure both view are kept in 
sync. If the user see a row and on refresh it is no longer there, this is bad.

Samuel

Le 2013-05-14 à 10:08, Jan Taterka <[email protected]> a écrit :

> Hi guys,
> 
> Just wonder about some batched AjaxUpdateContainer. I have following 
> situation in my app:
> 
> <wo:AjaxUpdateContainer name ="uc" id="someId" fullSubmit="true" id = ucId >
>       <wo:WORepetition name = "rep" list=myList item=myItem>
>               <tr>
>                       <td><wo:WOPopUpButton ...></td>
>                       <td> ... </td>
>               </tr>
>       </wo:WORepetition>
>       <wo:AjaxSubmitButton updateContainerId = ucId name="addMoreBtn" action 
> = addEmptyListItem ... />
> </wo:AjaxUpdateContainer>
> 
> 
> and java:
> 
> public NSMutableArray<SomeObject> myList;
> public SomeObject myItem;
> 
> public WOActionResults addEmptyListItem() {
>       
>       if(myList == null) {
>               myList = new NSMutableArray<SomeObject>();
>       }
> 
>       myList.addObject(new SomeObject());
>       return null;
> 
> }
> 
> public String ucId() {
>       return "unique-constant-id";
> }
> 
> Just to draft the code. Now, When the size of myList is lower than for 
> example 200 elements, the addEmptyListItem method executes quite fast. When 
> riching 200+elements, the response is a bit to large (1MB uncompressed) and 
> adding new line takes 3-4 seconds and this time grows in function of list's 
> elements count. Unfortunately, in my repetition is some DOM based javascript, 
> so it slow's down the response a bit more.
> 
> I wonder, i i can e ome trick / component i do not know, which could help 
> with this situation? One of my ideas is UpdateContainer only for last "row", 
> but how to do it? (Each row my contain some link to "remove" element from 
> list, what breaks my idea of making separated UpdateContainer for evry N rows 
> (30-40).
> 
> 
> Thanks for any help!

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to