0 Replies Latest reply on Nov 20, 2015 10:39 AM by Eric Peterson

    Improving WDC Performance

    Eric Peterson

      Hello again WDC community!

       

      TLDR: check out my post on improving WDC performance.  Motivations and details below:

       

      If you've implemented pagination on your WDC in the manner described here, you may notice that the performance of your Web Data Connector degrades as the size of your data set increases.  In my case, I was connecting an API that limited the number of records retrieved per request to 25 (so I noticed the degradation very quickly).

       

      When using that pagination method, you might say that the time it takes your WDC to return data is linear, or directly proportional to the number of requests you have to make to retrieve the full set.  Here's a visual depiction of what that looks like:

       

      waterfall-sync.png

       

      The trouble is that we're not using JavaScript to its full potential.  Although the language is single-threaded, it has asynchronous features that we can exploit to effectively return data in parallel.  A lot of libraries make this very easy; you're probably already familiar with jQuery.ajax() and jQuery.getJSON, which do this under the hood.

       

      If you were to take advantage of this language feature in a Web Data Connector, performance becomes sub-linear and might look something like this:

       

      waterfall-async.png

       

      Asynchronous applications can become complex, but there are patterns out there to help manage it.  I've put together a post that dives into the problem outlined above in further detail, offers a solution to the complexity problem, and provides some handy code snippets you can use as a starting point when optimizing your WDC.

       

      Check it out here!