Announcement

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

    Improving launch speed with multiple calls to DataSourceLoader?

    The FAQ suggests the <script> tag to load datasources can be split. I'd like to be selective and only load the datasources needed to display the first "page" of the app. Then load the others in the background. Loading datasources from the servlet is by far the longest call during startup so limiting it to the bare minimum should improve the user's experience.

    I assume we'd have to get the inheritsFrom datasources loaded in correct order, and we'd need to be sure a datasource was loaded before a page needing it was rendered.

    Are there any more pitfalls to this idea?

    Thanks!
    ,Chris
    SmartClient version: v9.0p_2013-07-11EVAL

    #2
    No other pitfalls, and in fact switching to a call to DataSourcd.load() will take care of inheritance for you if you pass the loadParents flag.

    However, the DataSourceLoader call normally would not take a significant amount of time even for a very long list of DataSources, so you might first look into why it's slow before attempting this (possibly unnecessary) optimization.

    Comment


      #3
      Excellent!
      Thanks!

      Comment


        #4
        Originally posted by Isomorphic View Post
        However, the DataSourceLoader call normally would not take a significant amount of time even for a very long list of DataSources, so you might first look into why it's slow before attempting this (possibly unnecessary) optimization.
        While the DataSourceLoader it self is fast for me as well, it produces a huge amount of data (230kb for me). For production, you might want to compress the result (order of a magnitude difference for me) as well as configure caching.

        Best regards,
        Blama

        Comment

        Working...
        X