13 Replies Latest reply on Jul 23, 2012 3:49 AM by julien_viet

    Poor Performance of Sitemap

    uwew

      Having about 1000 navigation nodes, each node with about 1-20 children the performance of the standard sitemap seems to be very poor. Opening a single branch can take up to a minute - the depth in the portlet preferences is set to 1. Accessing the sitemap from some more browsers causes the app server to completely stop serving.

       

      Are there any possibilities to improve the performance of the sitemap? If not, has anynone a code snippet on how to access the GateIn API in order to retrieve the nodes and their relations "by hand"?

       

      System: Community JBoss AS 7.1, GateIn 3.2

       

      Thx in advance,

      Uwe

        • 1. Re: Poor Performance of Sitemap
          vstorm83

          Hi, how many nodes do you have at the first level ? and how did you change the portlet preferences (change the portlet.xml or use the UI) did you try to login, and logout again ?

          It takes time when you open the page with sitemap portlet (the first request) or only when you click on the node to expand the tree ?

          • 2. Re: Poor Performance of Sitemap
            uwew

            - at the top level, i.e. under "default", there are 7 nodes

            - i changed the preferences via the ui

            - i also tried to log in and log out - but with no (positive) effect

            - it takes time for both actions: when i load the page with the sitemap portlet and also when i expand the tree - especially the expansion of the (sub)trees is very slow

             

            Kind Regards,

            Uwe

            • 3. Re: Poor Performance of Sitemap
              vstorm83

              This is strange, SiteMap load the nodes lazily. Even you have many nodes --> at the first time, it only load 7 nodes, it should be fast

              Can you look at firebug (firefox)--> netTab or developer tool of chrome and see the JSON response from server when you click to expand the node, it should only return 1 level - the childrens of that node

              It would be easier if you can provide the dataset. so we can test it and find out the reason why it's slow

              • 4. Re: Poor Performance of Sitemap
                nscavell

                Are you having the same issue in the navigation menu ? I think one of the issues is that in order to render the navigation nodes, it needs to obtain the permissions on the page. In order to obtain the permissions on the page it fetches the entire Page object, which includes the layout, applications, and anything else. As this will decrease performance a little bit, I'm wondering if more nodes are being fetched then what's needed and pulling all the page data is having an increasing impact on performance.

                • 5. Re: Poor Performance of Sitemap
                  uwew

                  i tried to track down the requests with firebug. Result was that some requests timed out (>1min), attached you can find a sample request that was in time (38sec) and the json result:

                  json-response.PNG

                   

                  Page:

                  http://xxxx/portal/classic/sitemap?portal:windowState=normal&portal:componentId=20ddd5ba-16a7-45d1-8dba-7bf32d938cb5&portal:resourceID=e089aaef7f00000201eab49a3d87f695&portal:cacheLevel=PAGE&portal:type=resource&portal:portletMode=view

                  Response:

                  0

                      Object { actionLink="/portal/classic/navifsl...ufendeausschreibungen_1", collapseURL="/portal/classic/sitemap...X18*&portal:type=action", getNodeURL="/portal/classic/sitemap...portal:portletMode=view", mehr...}

                     

                  actionLink

                      "/portal/classic/navifsl...ufendeausschreibungen_1"

                     

                  collapseURL

                      "/portal/classic/sitemap...X18*&portal:type=action"

                     

                  getNodeURL

                      "/portal/classic/sitemap...portal:portletMode=view"

                     

                  hasChild

                      true

                     

                  childs

                      [Object { actionLink="/portal/classic/navifsl...entlicheausschreibungen", collapseURL="/portal/classic/sitemap...X18*&portal:type=action", getNodeURL="/portal/classic/sitemap...portal:portletMode=view", mehr...}, Object { actionLink="/portal/classic/navifsl...navifseuausschreibungen", collapseURL="/portal/classic/sitemap...X18*&portal:type=action", getNodeURL="/portal/classic/sitemap...portal:portletMode=view", mehr...}, Object { actionLink="/portal/classic/navifsl...1/navifsverkaufaltteile", collapseURL="/portal/classic/sitemap...X18*&portal:type=action", getNodeURL="/portal/classic/sitemap...portal:portletMode=view", mehr...}, Object { actionLink="/portal/classic/navifsl...sausschreibungendetails", collapseURL="/portal/classic/sitemap...X18*&portal:type=action", getNodeURL="/portal/classic/sitemap...portal:portletMode=view", mehr...}]

                     

                  0

                      Object { actionLink="/portal/classic/navifsl...entlicheausschreibungen", collapseURL="/portal/classic/sitemap...X18*&portal:type=action", getNodeURL="/portal/classic/sitemap...portal:portletMode=view", mehr...}

                     

                  actionLink

                      "/portal/classic/navifsl...entlicheausschreibungen"

                     

                  collapseURL

                      "/portal/classic/sitemap...X18*&portal:type=action"

                     

                  getNodeURL

                      "/portal/classic/sitemap...portal:portletMode=view"

                     

                  hasChild

                      false

                     

                  childs

                      []

                     

                  label

                      "Öffentliche Ausschreibungen"

                     

                  isExpanded

                      false

                     

                  1

                      Object { actionLink="/portal/classic/navifsl...navifseuausschreibungen", collapseURL="/portal/classic/sitemap...X18*&portal:type=action", getNodeURL="/portal/classic/sitemap...portal:portletMode=view", mehr...}

                     

                  actionLink

                      "/portal/classic/navifsl...navifseuausschreibungen"

                     

                  collapseURL

                      "/portal/classic/sitemap...X18*&portal:type=action"

                     

                  getNodeURL

                      "/portal/classic/sitemap...portal:portletMode=view"

                     

                  hasChild

                      false

                     

                  childs

                      []

                     

                  label

                      "EU-Ausschreibungen"

                     

                  isExpanded

                      false

                     

                  2

                      Object { actionLink="/portal/classic/navifsl...1/navifsverkaufaltteile", collapseURL="/portal/classic/sitemap...X18*&portal:type=action", getNodeURL="/portal/classic/sitemap...portal:portletMode=view", mehr...}

                     

                  actionLink

                      "/portal/classic/navifsl...1/navifsverkaufaltteile"

                     

                  collapseURL

                      "/portal/classic/sitemap...X18*&portal:type=action"

                     

                  getNodeURL

                      "/portal/classic/sitemap...portal:portletMode=view"

                     

                  hasChild

                      false

                     

                  childs

                      []

                     

                  label

                      "Verkauf Altteile"

                     

                  isExpanded

                      false

                     

                  3

                      Object { actionLink="/portal/classic/navifsl...sausschreibungendetails", collapseURL="/portal/classic/sitemap...X18*&portal:type=action", getNodeURL="/portal/classic/sitemap...portal:portletMode=view", mehr...}

                     

                  actionLink

                      "/portal/classic/navifsl...sausschreibungendetails"

                     

                  collapseURL

                      "/portal/classic/sitemap...X18*&portal:type=action"

                     

                  getNodeURL

                      "/portal/classic/sitemap...portal:portletMode=view"

                     

                  hasChild

                      false

                     

                  childs

                      []

                     

                  label

                      "Ausschreibungen Details"

                     

                  isExpanded

                      false

                     

                  label

                      "Laufende Ausschreibungen"

                     

                  isExpanded

                      false

                     

                  1

                      Object { actionLink="/portal/classic/navifsl...planteausschreibungen_1", collapseURL="/portal/classic/sitemap...X18*&portal:type=action", getNodeURL="/portal/classic/sitemap...portal:portletMode=view", mehr...}

                     

                  actionLink

                      "/portal/classic/navifsl...planteausschreibungen_1"

                     

                  collapseURL

                      "/portal/classic/sitemap...X18*&portal:type=action"

                     

                  getNodeURL

                      "/portal/classic/sitemap...portal:portletMode=view"

                     

                  hasChild

                      false

                     

                  childs

                      []

                     

                  label

                      "Geplante Ausschreibungen"

                     

                  isExpanded

                      false

                     

                  2

                      Object { actionLink="/portal/classic/navifsl...1/navifsbeschaffungsabo", collapseURL="/portal/classic/sitemap...X18*&portal:type=action", getNodeURL="/portal/classic/sitemap...portal:portletMode=view", mehr...}

                     

                  actionLink

                      "/portal/classic/navifsl...1/navifsbeschaffungsabo"

                     

                  collapseURL

                      "/portal/classic/sitemap...X18*&portal:type=action"

                     

                  getNodeURL

                      "/portal/classic/sitemap...portal:portletMode=view"

                     

                  hasChild

                      false

                     

                  childs

                      []

                     

                  label

                      "Beschaffungs-Abo"

                     

                  isExpanded

                      false

                     

                  3

                      Object { actionLink="/portal/classic/navifsl...avifslieferantenetikett", collapseURL="/portal/classic/sitemap...X18*&portal:type=action", getNodeURL="/portal/classic/sitemap...portal:portletMode=view", mehr...}

                     

                  actionLink

                      "/portal/classic/navifsl...avifslieferantenetikett"

                     

                  collapseURL

                      "/portal/classic/sitemap...X18*&portal:type=action"

                     

                  getNodeURL

                      "/portal/classic/sitemap...portal:portletMode=view"

                     

                  hasChild

                      false

                     

                  childs

                      []

                     

                  label

                      "Lieferanten-Etikett"

                     

                  isExpanded

                      false

                  • 6. Re: Poor Performance of Sitemap
                    uwew

                    yes, we are facing the same problem with the navigation menu - and the problem there seems to be even worse.

                    • 7. Re: Poor Performance of Sitemap
                      vstorm83

                      according to your firebug result, the SiteMap preference "level" doesn't work --> it's loading 2 level

                       

                      hasChild

                          true

                        

                      childs

                          [Object { actionLink="/portal/classic/navifsl...entlicheausschreibungen", collapseURL="/portal/classic/sitemap...X18*&portal:type=action", getNodeURL="/portal/classic/sitemap...portal:portletMode=view", mehr...}, Object { actionLink="/portal/classic/navifsl...navifseuausschreibungen", collapseURL="/portal/classic/sitemap...X18*&portal:type=action", getNodeURL="/portal/classic/sitemap...portal:portletMode=view", mehr...}, Object { actionLink="/portal/classic/navifsl...1/navifsverkaufaltteile", collapseURL="/portal/classic/sitemap...X18*&portal:type=action", getNodeURL="/portal/classic/sitemap...portal:portletMode=view", mehr...}, Object { actionLink="/portal/classic/navifsl...sausschreibungendetails", collapseURL="/portal/classic/sitemap...X18*&portal:type=action", getNodeURL="/portal/classic/sitemap...portal:portletMode=view", mehr...}]

                       

                      childs should be empty (it must be loaded lazily) , may be this is the reason why it's slow

                      Can you check with other server (tomcat6) or try the newer version of GateIn.

                      I have checked with GateIn 3.2.0-GA and tomcat6, it works properly (note that there is a bug, after change the sitemap preference, you have to sign-out, and sign-in again to make it work)

                      • 8. Re: Poor Performance of Sitemap
                        uwew

                        Maybe the reason was that i did not log in -> log out -> log in. I hope that if i did this once, that it is also valid for all other (an anonymous) users.

                        Now i made it that it is loading only one level - this means that the loading time is now about 5-10sec (see attached firebug result) in comparison to a minute before.

                        But still this gives me some headache if i should use this in a production environment :-(

                        json-response-1.png

                        • 9. Re: Poor Performance of Sitemap
                          julien_viet

                          Hi Uwe,

                           

                          your loading is not dependent of the navigation size (his problem was adressed in gatein 3.2) and for a next version (3.4) we will work on reducing the constant factor for loading navigation nodes.

                           

                          Julien

                          • 10. Re: Poor Performance of Sitemap
                            uwew

                            Julien,

                             

                            could you provide me or point me to some code snippets or examples, where i am able to access the navigation api directly and not via rest services. This would be helpful for me, as i could then try to build up a custom sitemap and navigation.

                             

                            Uwe

                            • 11. Re: Poor Performance of Sitemap
                              julien_viet

                              One thing you could do if you are not in a hurry (i.e you are in development mode of your portal) is to test the new "public API" for navigations. At the moment we are providing an API whose purpose is to resolve your exact use case.

                               

                              The first version of this API will be released soon in GateIn 3.4 Milestone 1 (Final expected for September) but you can already build it.

                               

                              This way you can use this API for your use case and provide us important feedback about the API with your use case.

                               

                              What do you think ?

                              • 12. Re: Poor Performance of Sitemap
                                uwew

                                Unfortunately i have to use version 3.2 of GateIn, so for me there is no way to use the 3.4 api. Is there an equivalent api in the 3.2 version?

                                • 13. Re: Poor Performance of Sitemap
                                  julien_viet

                                  yes there is an internal API that we use, however this API can change at some point (which is why we are working on providing a public API).

                                   

                                  You can look at the various GateIn portlet such as the SiteMap portlet or the navigation portlet, you can find them in GateIn source code : https://github.com/gatein/gatein-portal/tree/master/portlet/web/src/main/java/org/exoplatform/portal/webui/component