Re: 5.4 JavaScript: Explicit vs. Unobtrusive initialization

2012-11-09 Thread Massimo Lusetti
On Thu, Nov 8, 2012 at 6:32 PM, Howard Lewis Ship hls...@gmail.com wrote: I modified the fiddle to loop 100 times; this will partially account for cachine, and MV optimizations. By the last round: idLookup: 2ms dataLookup: 15ms Still, tiny amounts of time. I would definitely prefer the

Re: 5.4 JavaScript: Explicit vs. Unobtrusive initialization

2012-11-09 Thread Howard Lewis Ship
I'm working on a revised DateField right now, and driving it towards the unobtrusive approach instead of the explicit approach. On Fri, Nov 9, 2012 at 6:42 AM, Massimo Lusetti mluse...@gmail.com wrote: On Thu, Nov 8, 2012 at 6:32 PM, Howard Lewis Ship hls...@gmail.com wrote: I modified the

Re: 5.4 JavaScript: Explicit vs. Unobtrusive initialization

2012-11-09 Thread Massimo Lusetti
BTW I've run the fiddle on my box several times and here are the average: idLookup took: 6ms, found:1000 dataLookup took: 8ms, found: 1000 Cheers On Fri, Nov 9, 2012 at 6:45 PM, Howard Lewis Ship hls...@gmail.com wrote: I'm working on a revised DateField right now, and driving it towards the

Re: 5.4 JavaScript: Explicit vs. Unobtrusive initialization

2012-11-08 Thread Lance Java
Sounds to me like a benchmark is needed to compare id lookup against full DOM scan for data attributes on all the major browsers on small, medium and large web pages. -- View this message in context:

Re: 5.4 JavaScript: Explicit vs. Unobtrusive initialization

2012-11-08 Thread Lance Java
Here's a first attempt at benchmarking the differences: http://jsfiddle.net/xPVy6/6/ -- View this message in context: http://tapestry.1045711.n5.nabble.com/5-4-JavaScript-Explicit-vs-Unobtrusive-initialization-tp5717787p5717818.html Sent from the Tapestry - Dev mailing list archive at

Re: 5.4 JavaScript: Explicit vs. Unobtrusive initialization

2012-11-08 Thread trsvax
If I understand your question correctly you are trying to figure out if it's better to initialize the javascript elements on the client side by id or by some other kind of selector. I use both Bootstrap and the Facebook apis and they both use data elements and then automatically initialize the

Re: 5.4 JavaScript: Explicit vs. Unobtrusive initialization

2012-11-08 Thread Howard Lewis Ship
I modified the fiddle to loop 100 times; this will partially account for cachine, and MV optimizations. By the last round: idLookup: 2ms dataLookup: 15ms Still, tiny amounts of time. On Thu, Nov 8, 2012 at 4:45 AM, Lance Java lance.j...@googlemail.comwrote: Here's a first attempt at

Re: 5.4 JavaScript: Explicit vs. Unobtrusive initialization

2012-11-08 Thread Thiago H de Paula Figueiredo
On Thu, 08 Nov 2012 15:32:56 -0200, Howard Lewis Ship hls...@gmail.com wrote: I modified the fiddle to loop 100 times; this will partially account for cachine, and MV optimizations. By the last round: idLookup: 2ms dataLookup: 15ms Still, tiny amounts of time. Which browser? Anyway, even

Re: 5.4 JavaScript: Explicit vs. Unobtrusive initialization

2012-11-08 Thread Howard Lewis Ship
Maybe Tapestry should automatically display a Switch to Chrome alert if it detects IE :-) On Thu, Nov 8, 2012 at 10:32 AM, Thiago H de Paula Figueiredo thiag...@gmail.com wrote: On Thu, 08 Nov 2012 15:32:56 -0200, Howard Lewis Ship hls...@gmail.com wrote: I modified the fiddle to loop 100

5.4 JavaScript: Explicit vs. Unobtrusive initialization

2012-11-07 Thread Howard Lewis Ship
One of the major changes taking place in the 5.4 branch is the choice between explicit initialization and unobtrusive initialization. Tapestry has traditionally used explicit initialization: - render and element, with a specific id - generate parameters object that describes the behavior, and