I hope I'm not speaking out of turn. However, with regards to:
The only drawback I see is that error reporting
will be worse because the exception message will say "there is an
error in 'all JS in one <evaluate> here' "
What if they combining for efficiency was only done on `DEPLOYMENT`? That way
when a user is developing a page and debugging the JavaScript the error message
will be more useful. (provided {} and/or function() truly is enough to solve
variable scoping issues.)
Tom Burton
-----Original Message-----
From: Martin Grigorov [mailto:[email protected]]
Sent: Wednesday, February 08, 2012 4:25 AM
To: [email protected]
Subject: JS performance optimization in AjaxRequestTarget
Hi,
Do you imagine a use case in which several <evaluate>s in
<ajax-response> should be executed separately (one after another) as
it is now ?
Each <evaluate> (and <priority-evaluate>) is executed in an eval() in
wicket-ajax.js. As we all know eval() is slow. As an optimization I
think we can merge all <evaluate>s in one (at server side) and eval
them all together. The only drawback I see is that error reporting
will be worse because the exception message will say "there is an
error in 'all JS in one <evaluate> here' "
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com