Sent from my iPhone

On Dec 10, 2012, at 20:00, [email protected] wrote:

Send Webobjects-dev mailing list submissions to
   [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
   https://lists.apple.com/mailman/listinfo/webobjects-dev
or, via email, send a message with subject or body 'help' to
   [email protected]

You can reach the person managing the list at
   [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Webobjects-dev digest..."


Today's Topics:

  1. Re: Binary Plist generation very slow (amedeomantica)
  2. Re: Binary Plist generation very slow (Pascal Robert)
  3. Re: Binary Plist generation very slow (Alexander Spohr)
  4. WOComponent Function Call Order (Louis-Olivier Roof)
  5. Re: WOComponent Function Call Order (Alexander Spohr)


----------------------------------------------------------------------

Message: 1
Date: Mon, 10 Dec 2012 12:31:23 +0100
From: amedeomantica <[email protected]>
To: Jesse Tayler <[email protected]>
Cc: WebObjects-Dev List <[email protected]>
Subject: Re: Binary Plist generation very slow
Message-ID: <[email protected]>
Content-Type: text/plain; CHARSET=US-ASCII

The iOS parse is very fast

how much is big your plist ?

What did u put inside ?
Try to lookup what key/value is making it slow

Amedeo

On 06/dic/2012, at 17:37, Jesse Tayler <[email protected]> wrote:


something wrong there? I haven't done tests, that's great to get those digits, how?

my rather short testing some years back suggested that bplist was VERY fast, so I wonder?

keep us posted about what you find please!


On Dec 6, 2012, at 5:16 AM, Alexander Spohr <[email protected]> wrote:

Hi List,

we tried to switch from string based plists to binary ones. The clients love it but it almost kills the servers.

The binary plist generation is 26 times slower (for my test case):
Duration:  2881 ms NSPropertyListOpenStepFormat
Duration: 75008 ms NSPropertyListBinaryFormat_v1_0

Does anyone have a faster binary plist generator at hand before I try to roll my own?

   atze



_______________________________________________
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/jtayler%40oeinc.com

This email sent to [email protected]


_______________________________________________
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/amedeomantica%40me.com

This email sent to [email protected]



------------------------------

Message: 2
Date: Mon, 10 Dec 2012 06:46:35 -0500
From: Pascal Robert <[email protected]>
To: amedeomantica <[email protected]>
Cc: WebObjects-Dev List <[email protected]>
Subject: Re: Binary Plist generation very slow
Message-ID: <[email protected]>
Content-Type: text/plain; charset=iso-8859-1


Le 2012-12-10 à 06:31, amedeomantica <[email protected]> a écrit :

The iOS parse is very fast

He did say that the iOS (client) part is fast, it's the generation of the binary plist on the WO side that is slow.

how much is big your plist ?

What did u put inside ?
Try to lookup what key/value is making it slow

Amedeo

On 06/dic/2012, at 17:37, Jesse Tayler <[email protected]> wrote:


something wrong there? I haven't done tests, that's great to get those digits, how?

my rather short testing some years back suggested that bplist was VERY fast, so I wonder?

keep us posted about what you find please!


On Dec 6, 2012, at 5:16 AM, Alexander Spohr <[email protected]> wrote:

Hi List,

we tried to switch from string based plists to binary ones. The clients love it but it almost kills the servers.

The binary plist generation is 26 times slower (for my test case):
Duration:  2881 ms NSPropertyListOpenStepFormat
Duration: 75008 ms NSPropertyListBinaryFormat_v1_0

Does anyone have a faster binary plist generator at hand before I try to roll my own?

   atze



_______________________________________________
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/jtayler%40oeinc.com

This email sent to [email protected]


_______________________________________________
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/amedeomantica%40me.com

This email sent to [email protected]

_______________________________________________
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/probert%40macti.ca

This email sent to [email protected]




------------------------------

Message: 3
Date: Mon, 10 Dec 2012 15:43:42 +0100
From: Alexander Spohr <[email protected]>
To: WebObjects-Dev List <[email protected]>
Subject: Re: Binary Plist generation very slow
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252

Never use dicts or arrays as a hashtable’s keys!

I removed the uniquing of dicts, arrays and sets. I now use an int based hash table with object.hashCode() as the key. My binary property list generation is now faster than the string based version.

The test file is a 11MB string based property list, run over a 100 times each.
Duration: 15805ms NSPropertyListOpenStepFormat
Duration: 10084ms NSPropertyListBinaryFormat_v1_0

If java could provide the address of an object I would use that and unique the collections again. The address would be a nice hash key. Unfortunately you don’t get addresses in Java and the hashCode() of collections are unusable.

   atze


Original file (contains lots of spaces):
-rw-r--r--@  1 atze  atze  11786993  9 Dez 18:35 3500Attacks.plist

Binary:
-rw-r--r--   1 atze  atze   1270690 10 Dez 15:39 3500Attacks.plistb

Reverse test to ensure both (string & binary) generate the same output (using tabs instead of spaces):
-rw-r--r--   1 atze  atze   6819317 10 Dez 15:39 3500Attacks.plistx
-rw-r--r--   1 atze  atze   6819317 10 Dez 15:39 3500Attacks.plisty




Am 06.12.2012 um 11:16 schrieb Alexander Spohr <[email protected]>:

Hi List,

we tried to switch from string based plists to binary ones. The clients love it but it almost kills the servers.

The binary plist generation is 26 times slower (for my test case):
Duration:  2881 ms NSPropertyListOpenStepFormat
Duration: 75008 ms NSPropertyListBinaryFormat_v1_0

Does anyone have a faster binary plist generator at hand before I try to roll my own?

   atze



------------------------------

Message: 4
Date: Mon, 10 Dec 2012 13:41:20 -0500
From: Louis-Olivier Roof <[email protected]>
To: WebObjects Development <[email protected]>
Subject: WOComponent Function Call Order
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"

Hello WebObjects community, this is my first question so don't be too hard on me ;)

Lets say I have a wo:loop  in a component...

    <wo:loop list = "$dg.displayedObjects" item = "$aItem">
       <tr>
         <td> <wo:string value = "$~timeConsumingCallA()" /> </td>
         <td> <wo:string value = "$~timeConsumingCallB()" /> </td>
<td> <wo:string value = "$~callDependingOn_A_and_B()" /> </ td>
       </tr>
     </wo:loop>

Functions timeConsumingCallA() and timeConsumingCallB() are, as their name imply, costly calls. Function callDependingOn_A_and_B() depends on the results of the two first functions.

Is there any guarantee that the two function calls (timeConsumingCallA, timeConsumingCallB) will always be called in order and before callDependingOn_A_and_B() so I can set and depend on instance variables $timeConsumingCallA_result and $timeConsumingCallB_result in the callDependingOn_A_and_B() function?

If not, I can see a number of ways I could myself make sure the calls are made in the correct order in straight-Java, but I was wondering if there was a "Wonder/WebObjects" strategy to approach this.

Thanks for your time,

--
Louis-Olivier Roof, Eng.
Software Engineer
Obzerv Technologies Inc.
400, Jean-Lesage, suite 201,
Québec (Québec)
Canada, G1K 8W1
T. (418) 524-3522
F. (418) 524-6745
www.obzerv.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.apple.com/archives/webobjects-dev/attachments/20121210/7d168598/attachment.html >

------------------------------

Message: 5
Date: Mon, 10 Dec 2012 20:01:41 +0100
From: Alexander Spohr <[email protected]>
To: Louis-Olivier Roof <[email protected]>
Cc: WebObjects Development <[email protected]>
Subject: Re: WOComponent Function Call Order
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252

WO runs from to to bottom of your page. So it should work.

A better way would be to do the calculations in appendToResponse() before you call super. Then all will be set before the page is rendered. If you can not do that because of your loop, you could do it in the displayedObjects call. Or in a method that calls displayedObjects and returns after your calculation for this item.

   atze


Am 10.12.2012 um 19:41 schrieb Louis-Olivier Roof <[email protected] >:

Hello WebObjects community, this is my first question so don't be too hard on me ;)

Lets say I have a wo:loop  in a component...

    <wo:loop list = "$dg.displayedObjects" item = "$aItem">
       <tr>
         <td> <wo:string value = "$~timeConsumingCallA()" /> </td>
         <td> <wo:string value = "$~timeConsumingCallB()" /> </td>
<td> <wo:string value = "$~callDependingOn_A_and_B()" /> </ td>
       </tr>
     </wo:loop>

• Functions timeConsumingCallA() and timeConsumingCallB() are, as their name imply, costly calls. • Function callDependingOn_A_and_B() depends on the results of the two first functions.

Is there any guarantee that the two function calls (timeConsumingCallA, timeConsumingCallB) will always be called in order and before callDependingOn_A_and_B() so I can set and depend on instance variables $timeConsumingCallA_result and $timeConsumingCallB_result in the callDependingOn_A_and_B() function?

If not, I can see a number of ways I could myself make sure the calls are made in the correct order in straight-Java, but I was wondering if there was a "Wonder/WebObjects" strategy to approach this.

Thanks for your time,




------------------------------

_______________________________________________
Webobjects-dev mailing list
[email protected]
https://lists.apple.com/mailman/listinfo/webobjects-dev

End of Webobjects-dev Digest, Vol 9, Issue 986
**********************************************

_______________________________________________
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