You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (Created) (JIRA)" <ji...@apache.org> on 2012/02/20 09:45:36 UTC

[jira] [Created] (WICKET-4418) Combine all JavaScript evaluations in one element for better performance at the client side

Combine all JavaScript evaluations in one <evaluate> element for better performance at the client side
------------------------------------------------------------------------------------------------------

                 Key: WICKET-4418
                 URL: https://issues.apache.org/jira/browse/WICKET-4418
             Project: Wicket
          Issue Type: Improvement
          Components: wicket
    Affects Versions: 6.0.0
            Reporter: Martin Grigorov
            Assignee: Martin Grigorov
             Fix For: 6.0.0


Ajax response may contain several <evaluate> (and <priority-evaluate>) elements which are eval-ed one by one when <ajax-response> is processed. This can be improved by combining the bodies (the JS code) of all <evaluate>s in one bigger <evaluate>.

See http://markmail.org/thread/qdgn4qvqp4kzuptb for the discussion.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WICKET-4418) Combine all JavaScript evaluations in one element for better performance at the client side

Posted by "Martin Grigorov (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13212492#comment-13212492 ] 

Martin Grigorov commented on WICKET-4418:
-----------------------------------------

Here is a benchmark showing that Firefox is actually slower with combined eval, IE is the same, all other are faster with one eval.

http://jsperf.com/one-function-vs-several
                
> Combine all JavaScript evaluations in one <evaluate> element for better performance at the client side
> ------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4418
>                 URL: https://issues.apache.org/jira/browse/WICKET-4418
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket
>    Affects Versions: 6.0.0
>            Reporter: Martin Grigorov
>            Assignee: Martin Grigorov
>             Fix For: 6.0.0
>
>
> Ajax response may contain several <evaluate> (and <priority-evaluate>) elements which are eval-ed one by one when <ajax-response> is processed. This can be improved by combining the bodies (the JS code) of all <evaluate>s in one bigger <evaluate>.
> See http://markmail.org/thread/qdgn4qvqp4kzuptb for the discussion.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WICKET-4418) Combine all JavaScript evaluations in one element for better performance at the client side

Posted by "Martin Grigorov (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13212507#comment-13212507 ] 

Martin Grigorov commented on WICKET-4418:
-----------------------------------------

Actually it is not even possible to execute something like: eval("function() { console.log(1); }();")
It seems it is not possible to run anonymous function in an eval.
                
> Combine all JavaScript evaluations in one <evaluate> element for better performance at the client side
> ------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4418
>                 URL: https://issues.apache.org/jira/browse/WICKET-4418
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket
>    Affects Versions: 6.0.0
>            Reporter: Martin Grigorov
>            Assignee: Martin Grigorov
>
> Ajax response may contain several <evaluate> (and <priority-evaluate>) elements which are eval-ed one by one when <ajax-response> is processed. This can be improved by combining the bodies (the JS code) of all <evaluate>s in one bigger <evaluate>.
> See http://markmail.org/thread/qdgn4qvqp4kzuptb for the discussion.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (WICKET-4418) Combine all JavaScript evaluations in one element for better performance at the client side

Posted by "Martin Grigorov (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4418?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov updated WICKET-4418:
------------------------------------

    Issue Type: Sub-task  (was: Improvement)
        Parent: WICKET-4252
    
> Combine all JavaScript evaluations in one <evaluate> element for better performance at the client side
> ------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4418
>                 URL: https://issues.apache.org/jira/browse/WICKET-4418
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket
>    Affects Versions: 6.0.0
>            Reporter: Martin Grigorov
>            Assignee: Martin Grigorov
>             Fix For: 6.0.0
>
>
> Ajax response may contain several <evaluate> (and <priority-evaluate>) elements which are eval-ed one by one when <ajax-response> is processed. This can be improved by combining the bodies (the JS code) of all <evaluate>s in one bigger <evaluate>.
> See http://markmail.org/thread/qdgn4qvqp4kzuptb for the discussion.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WICKET-4418) Combine all JavaScript evaluations in one element for better performance at the client side

Posted by "Christoph Leiter (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13212510#comment-13212510 ] 

Christoph Leiter commented on WICKET-4418:
------------------------------------------

Use eval("(function() { console.log(1); })();");
                
> Combine all JavaScript evaluations in one <evaluate> element for better performance at the client side
> ------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4418
>                 URL: https://issues.apache.org/jira/browse/WICKET-4418
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket
>    Affects Versions: 6.0.0
>            Reporter: Martin Grigorov
>            Assignee: Martin Grigorov
>
> Ajax response may contain several <evaluate> (and <priority-evaluate>) elements which are eval-ed one by one when <ajax-response> is processed. This can be improved by combining the bodies (the JS code) of all <evaluate>s in one bigger <evaluate>.
> See http://markmail.org/thread/qdgn4qvqp4kzuptb for the discussion.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (WICKET-4418) Combine all JavaScript evaluations in one element for better performance at the client side

Posted by "Martin Grigorov (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4418?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-4418.
-------------------------------------

       Resolution: Won't Fix
    Fix Version/s:     (was: 6.0.0)

We wont do this suggestion because it is slower for Firefox and doesn't give much for the other browsers (except WebKit based ones).

I changed the API of org.apache.wicket.ajax.AbstractAjaxResponse so that it is possible to add such optimizations later.
                
> Combine all JavaScript evaluations in one <evaluate> element for better performance at the client side
> ------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4418
>                 URL: https://issues.apache.org/jira/browse/WICKET-4418
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket
>    Affects Versions: 6.0.0
>            Reporter: Martin Grigorov
>            Assignee: Martin Grigorov
>
> Ajax response may contain several <evaluate> (and <priority-evaluate>) elements which are eval-ed one by one when <ajax-response> is processed. This can be improved by combining the bodies (the JS code) of all <evaluate>s in one bigger <evaluate>.
> See http://markmail.org/thread/qdgn4qvqp4kzuptb for the discussion.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira