Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    SmartGWT 12.0 DataSourceLoader performance significantly worse than 11.1

    Exact version: SmartClient Version: v12.0p_2020-01-16/PowerEdition Deployment (built 2020-01-16)

    We recently updated to SmartGWT 12.0 and our team found that we have to wait very long for our app to start up.
    I started investigating and found that loading our datasources took longer than before.

    Our situation:
    datasources to load: 240-260
    client-side when we load in we perform this (pseudocode)
    Code:
    getIdsToLoad(datasourceIds -> {
        if (!idsAreInCache(datasourceIds)) {
            DataSource.load(ids, putInCacheFunction, false);
        }
    })
    this performs a request to DataSourceLoader, I decided to extend it in order to track performance
    Code:
    public class CustomDataSourceLoader extends DataSourceLoader {
    
       @Override
       public void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
          StopWatch stopWatch = new StopWatch();
          stopWatch.start();
          super.processRequest(request, response);
          stopWatch.stop();
          System.err.println("Took " + stopWatch.getTotalTimeMillis() + " ms");
       }
    }
    on 11.1 this takes usually around 25-30 seconds but on 12.0 this can take 70-90 seconds and some in our team have even seen it take longer than 2 or 3 minutes (not sure how to reproduce that).
    This isn't a disaster but it's mildly annoying.

    Kind Regards,
    Jeno

    #2
    We don't see anything like the slowdown you report. Our own measurements show perhaps a 10% slowdown in SC 12.0 vs. 11.1 when a large number of DataSources are loaded. Can you provide some way for us to reproduce your issue?

    Also, can you comment as to whether you use "ds://" paths in your project dataSource config as documented here where it says, "To specify another DataSource to be used..." We have an optimization that targets that case, but it may not affect your situation.

    Comment


      #3
      We don't use "ds://" paths in our datasource configs

      It's hard to provide a reproducable scenario but I'm starting to think it might be because of the difference in datasource configs (*.ds.xml's) between our two versions where we also switched SmartGWT verisons.
      I came to this conclusion by reverting our SmartGWT 12 upgrade on our latest version and going back to 11.1 and it was still slow.

      Just a quick question though:
      The response of this call
      Code:
      {
          "actionURL":"http://localhost:8081/SLIMS/slims/sc/DataSourceLoader?dataSource="blah, foo, ...",
          "showPrompt":false,
          "transport":"xmlHttpRequest",
          "promptStyle":"cursor",
          "httpMethod":"GET",
          "willHandleError":true,
          "data":null
      }
      has a 0.2mb difference between our slow and quicker version. Could this mean something, like maybe to much config in our *.ds.xml's? (probably not I'm guessing)

      Will continue inverstigation when I have some more time.
      Next up I'll try performing two requests with each half of the ds' to load.

      Thanks for the help so far.
      Regards
      Jeno

      Comment


        #4
        You should be able to see what's actually being returned in the "network" tab of the browser's debug console. On Chrome you can "open in new tab" and the "select all" to save it for further investigation.

        Comment


          #5
          Yeah that's where I saw the 0.2 mb difference in response (saved the contents to a .txt and compared). I used the SmartClient Developer Console to inspect the request.

          Comment


            #6
            So how did the responses differ? What was the "extra" config being sent in one? You mentioned above you thought your DS xml files may have changed.

            Comment


              #7
              Update: The problem is not SmartGWT related. In development we usually run in debug mode and running in normal mode seems to fix the issue. We also switched to JDK 11 in our newest version so probably the combination of both JDK 11 and running in debug mode is causing things to slow down tremendously. I'll have to figure out why and do some research. We use IntelliJ IDE FYI.

              Anyway nothing to do with SmartGWT.

              Sorry for wasting your time and thanks for the quick responses.
              Last edited by JenoDK; 19th Mar 2020, 09:20.

              Comment

              Working...
              X