Tuesday, February 23, 2010

Caching edit methods

There was a great improvement done to the form datasource caching in AX 2009 - it is possible now to cache not only display methods but edit methods too. The caching of the edit methods can be performed in the same way as caching of display methods - by using FormDataSource.cacheAddMethod() method.
Despite that great improvement a lot of forms in AX 2009 haven't consumed it. So if you are looking for a solution to speed up existing AX 2009 form, edit methods that are not cached is a good place to look at.

4 comments:

  1. Its probably worth pointing out that cached methods execute for every row returned by the query data source that they are linked to each time executeQuery() fires. This means that caching these methods can actually slow the form down too.
    Cached display/edit methods are great when the display/edit method is placed in a data source grid but if your display/edit method is on a tab page its usually better not to cache the method. When the display method field is on a tab page it only fires if the user goes to that tab page.

    ReplyDelete
  2. Correct. You have to always consider whether to use caching or not.

    ReplyDelete