Details

    • Sub-task
    • Resolution: Done
    • Critical
    • WCM 5.0 SP3
    • WCM 5.0 SP3
    • None
    • SP3 18805

    Description

      Could someone explain to me why we launch the prototype lib in the edition engine?

      The prototype lib, even compressed, take ~200ms to be intialized on each click in the engine... So I do not think this is very useful...

      TestRail: Results

        Attachments

          Activity

            [JAHIA-2514] Prototype lib lanuched in the engine - why? 200ms spend on each click in order to reinitialize prototype

            Discussed in pm-dm (https://jahia.slack.com/archives/CNRFEDYHX/p1728046393480479), closing, as Inactive, all issues that were last updated before January 2023 (22 months ago).
            Please re-open if necessary

            fgerthoffert@jahia.com Francois Gerthoffert added a comment - Discussed in pm-dm ( https://jahia.slack.com/archives/CNRFEDYHX/p1728046393480479 ), closing, as Inactive, all issues that were last updated before January 2023 (22 months ago). Please re-open if necessary

            Should be fixed along with JAHIA-2528

            shyrkov Sergiy Shyrkov (Inactive) added a comment - Should be fixed along with JAHIA-2528

            Mmmh there is nothing wrong with it... excepted that all these AJAX frameworks load hundreds of unnecessary functions. That is why we were thinking about moving to GWT which dynamically only load the required js file.

            But if you only need this in order to make a ping, you have better to implement a small very ultra basic AJAX servlet on the Jahia side (quite similar to the workflow state one) in order to avoid having to load a full AAJX framework...

            In all the cases we will have to rewrite all this AJAX calls in the 5.1 with GWT. Because we know could have both prototype AND Zimbra loaded in the engine... This could also lead to some errors as prototppe redefines the array or the table function... which is also used by Zimbra... We had lots of trouble with that already in live mode... And this is also one of the reason we want ot move away from prototype because Portlets or other AJAX code put by a template developer could be broken by the underlying prototype framework.

            scroisier Stephane Croisier (Inactive) added a comment - Mmmh there is nothing wrong with it... excepted that all these AJAX frameworks load hundreds of unnecessary functions. That is why we were thinking about moving to GWT which dynamically only load the required js file. But if you only need this in order to make a ping, you have better to implement a small very ultra basic AJAX servlet on the Jahia side (quite similar to the workflow state one) in order to avoid having to load a full AAJX framework... In all the cases we will have to rewrite all this AJAX calls in the 5.1 with GWT. Because we know could have both prototype AND Zimbra loaded in the engine... This could also lead to some errors as prototppe redefines the array or the table function... which is also used by Zimbra... We had lots of trouble with that already in live mode... And this is also one of the reason we want ot move away from prototype because Portlets or other AJAX code put by a template developer could be broken by the underlying prototype framework.

            The Prototype library was added by me as a result of fix for JAHIA-2066, where I added a keep alive Ajax call to the server to keep the HTTP session.
            The easiest and cleanest way to do it, is to use Prototype's Ajax.Request, otherwise you need to do e.g.:
            if (window.XMLHttpRequest)

            { req = new XMLHttpRequest (); }

            else if (window.ActiveXObject) {
            req = new ActiveXObject ("Microsoft.XMLHTTP");

            a lot of additional handling, that you do not need.

            Prototype also introduces advanced DOM manipulation and event handling capabilities.

            I will check, what is wrong with it

            shyrkov Sergiy Shyrkov (Inactive) added a comment - The Prototype library was added by me as a result of fix for JAHIA-2066 , where I added a keep alive Ajax call to the server to keep the HTTP session. The easiest and cleanest way to do it, is to use Prototype's Ajax.Request, otherwise you need to do e.g.: if (window.XMLHttpRequest) { req = new XMLHttpRequest (); } else if (window.ActiveXObject) { req = new ActiveXObject ("Microsoft.XMLHTTP"); a lot of additional handling, that you do not need. Prototype also introduces advanced DOM manipulation and event handling capabilities. I will check, what is wrong with it

            If we need prototype for the new "work in progress", could we make a lighter version of the protype lib. I doubt we need 30Kb of compressed js just in order to display a work in progress.

            On field such as the categroy field, I have more than 130Kb of compressed JS lib to be initialized which take more than 600ms.... So we will not be able to modify a lot the zimbra package (until we move to GWT)... but could we make a more smaller prototype package with only the functions we need for the work in progress?

            scroisier Stephane Croisier (Inactive) added a comment - If we need prototype for the new "work in progress", could we make a lighter version of the protype lib. I doubt we need 30Kb of compressed js just in order to display a work in progress. On field such as the categroy field, I have more than 130Kb of compressed JS lib to be initialized which take more than 600ms.... So we will not be able to modify a lot the zimbra package (until we move to GWT)... but could we make a more smaller prototype package with only the functions we need for the work in progress?

            People

              shyrkov Sergiy Shyrkov (Inactive)
              scroisier Stephane Croisier (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                TestRail: Runs

                  TestRail: Cases

                    Packages

                      Version Package
                      WCM 5.0 SP3