7 Replies Latest reply: Sep 7, 2014 11:56 PM by Liam Dilley RSS

    Open Platform Web App Load Time

    FraserMcCulloch Community Member

      My devs have created a custom web app using Open Platform - the idea to search, sort, duplicate web app items

       

      Problem, it takes 25 seconds to load up 700 web app items.

       

      Is this normal ? Should it be better ? Is this a BC issue or developer issue. I've no idea, I'm just a marketing chap.

       

      Here's screencast

       

      http://www.screencast.com/t/pNWyWhBNkD0R

       

      Any feedback or insight on load time graciously appreciated

       

      Fraser

        • 1. Re: Open Platform Web App Load Time
          Liam Dilley CommunityMVP

          I made an app that does the same thing Fraser, I load web app items in chunks, can do over 1k in about 5-10 seconds. But I have already reported to BC how slow the bcapi.js methods are. They say to use them but I do not for that reason.

          • 2. Re: Open Platform Web App Load Time
            FraserMcCulloch Community Member

            cheers Liam, good to know I'm not alone and BC aware of this.

            • 3. Re: Open Platform Web App Load Time
              RaduCos Adobe Employee

              Hi Fraser,

               

              We are currently investigating the sdk to see why it is slow in some cases. Meanwhile, I took a look at your app code. What happens at the moment is that you have a  grid with multiple pages and your app load all vacancies (762 items at the moment) before displaying the grid. This mean the browser does 763 API requests before displaying any useful information.

               

              In my opinion, a better way to make your application responsive is to make a request for obtaining the items count and another 10 requests for fetching the first page of your application. This will significantly improve your application load time.

               

              Can you please try to rewrite your app as suggested here and tell me if you see any improvements?

               

              Kind regards,

              Radu

              • 4. Re: Open Platform Web App Load Time
                Liam Dilley CommunityMVP

                Which is what I do, I load chunks.

                As a question Radu - Right now on live servers - the "All" element for web app items in terms of modules and API - IS this load based now? I can do it and load 600+ items one site and then another site it is 548... etc.

                • 5. Re: Open Platform Web App Load Time
                  RaduCos Adobe Employee

                  For modules yes, for APIs no. For web app items API and other APIs, where is actually a PARSE query object which applies conditions on attributes belonging to the API resource (e.g web app item attributes). Below you can find a simple example for listing all web app items which name contains with "abc".

                   

                  GET /api/v2/admin/sites/123/webapps/TestWebapp1/items?where={"name": {"$contains": "abc"}}.

                   

                  I know you load chunks of data, but I was explaining to Fraser that for his specific use case there is no need to load more than 10 items. Afterwards, his app is perfectly usable for his users. Of course he can continue to load more data in background if he wants but it is not necessary.

                  • 6. Re: Open Platform Web App Load Time
                    FraserMcCulloch Community Member

                    My guys told me they have to load all web app items first, otherwise the client would not be able to perform a search and sort

                    • 7. Re: Open Platform Web App Load Time
                      Liam Dilley CommunityMVP

                      I guess they will be using a filter plugin of some sort.

                      Many of those have means to dynamically add more items to them and that will be in the documentation. If not they can look at other ones.

                       

                      But the API access is still slow. As I have posted in another post, Radu and team say to use the BCAPI.js methods but if they switch to the direct API endpoints they will find it a bit quicker.