No announcement yet.

getRecs being called twice upon opening app

  • Filter
  • Time
  • Show
Clear All
new posts

  • getRecs being called twice upon opening app

    When I open my app and the grid gets filled with data, I can see that getRecs is being called twice, and I think this is making things take longer than they should (sometimes to the point of timing out, as in the example shown in the image below).


    One call to getRecs getRecs1.png

  • #2
    A couple of scenarios I can think of:
    • The application is calling the load on the store multiple times causing two requests.
    • The store is set to autoload and the application is calling the load on the store causing two requests.
    You could add a beforeload listener on the store and perform a console.trace() to see the call stack in the developer console.


    • #3
      Actually, it seems like this is a bug... After checking a new app I just made with Autocode, it does the same thing. Checking several other apps show the same thing too, but I hadn't noticed it before because the performance was so quick loading the grid that it was not obvious that something is wrong. But this app that made me ask the question does a lot more heavy lifting behind the scenes, so investigating that revealed the double vvcall. I'm on Valence 4.2 and Architect 3.2 and extJS 4.2. Wonder if anyone else has this same issue and just isn't aware of it...?


      • #4
        I haven't looked at 4.2 in a while, but I don't recall this being an issue. Out of curiosity, I just fired up the 4.2 instance on our test box, logged in and created two AutoCode apps over the DEMOCMAST file -- one an inquiry app and one a file maintenance app. Neither app fires off more than one call to load the grid upon launch. Are you on the latest 4.2 build (4.2.20160330.0)?
        Last edited by robert.swanson; 04-28-2017, 07:21 PM.


        • #5
          I'm on 4.2.20160126.0