[CLOSED] Performance comparison between direct and static/shared direct methods

  1. #1

    [CLOSED] Performance comparison between direct and static/shared direct methods

    Hi,

    We are not getting better performance with static/shared direct methods when compared with direct methods.

    We developed a POC to compare direct methods and static direct methods performance. As a part of testing we did below functionality.
    1. There are five comboboxes.
    2. We are loading last four comboboxes on item change of first combobox.

    We have developed two separate .aspx pages one with direct methods and second page with static direct methods. When we use direct methods, we are assigning datasource to store and binding data. In static/shared direct methods case we are returning json data to client and binding stores by using
    var jdata = JSON.parse(result); store.loadData(jdata);
    When we compare functionality both pages are doing exact same but, when we compare time (by using developer tool or firebug or chrome developer plugin) we can see direct methods are performing better. This is not what we expected.

    Can you explain why this is happening? Are we missing any attributes to avail full benefits of static direct methods?

    Since code written is huge for this POC we can't attach all code here.
    Thank you.
    Last edited by Daniil; Apr 07, 2015 at 12:27 PM. Reason: Please use [CODE] tags, [CLOSED]
  2. #2
    Hi @iansriley,

    A static DirectMethod has no advantage on client side comparing with a regular DirectMethod.

    The only benefit of a static DirectMethod is that it doesn't create a Page instance on server. So, there is the only improvement possible - on server side.

    As for client side, a static DirectMethod and a non-static one are the same.

    Yes, you have the difference in your case, but your DirectMethods are not the same. One is binding data via .DataSource, another via a manual .loadData() call. Probably, binding the data via .DataSource produces the JavaScript code that is executed faster than a .loadData() call.
  3. #3
    Hi Daniil,
    Thanks for the reply.

    Ok, we understood that there won't be performance gain on client side script.
    As you mentioned, we will be gaining some performance by skipping some server side events in the case of static direct methods.
    1. We request you to list the events we skip in the case of static direct methods. Please consider the list of events for asp.net webforms application.
    2. Can we consider a direct method call is a normal page postback?

    Thank you,
  4. #4
    1. We request you to list the events we skip in the case of static direct methods. Please consider the list of events for asp.net webforms application.
    The page life cycle is not executed at all.

    2. Can we consider a direct method call is a normal page postback?
    A non-static DirectMethod might be considered as a regular ASP.NET PostBack if:

    1. There is a <form runat="server"> on the page and a DirectMethod submits that form.
    2. There is no method: "GET" in a DirectMethod's config.
    3. There is no type: "load" in a DirectMethod's config.
    4. There is no formId: "someFormId" and that form is not <form runat="server">
    5. A DirectMethod handler is defined on the same page (not another page or, for example, an HTTP handler)

    In all other cases a DirectMethod is not quite an ASP.NET PostBack.

Similar Threads

  1. Replies: 3
    Last Post: Feb 24, 2015, 12:08 AM
  2. [CLOSED] Session timeout & static direct methods
    By aisi_it_admin in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 05, 2015, 11:44 AM
  3. Replies: 11
    Last Post: Jun 13, 2014, 11:05 AM
  4. [CLOSED] Performance comparison between Ext.NET 1 and 2
    By softmachine2011 in forum 2.x Legacy Premium Help
    Replies: 13
    Last Post: Oct 09, 2012, 8:09 AM
  5. Are direct methods same as WebMethod
    By deeptechtons in forum 1.x Help
    Replies: 2
    Last Post: Dec 27, 2010, 3:31 AM

Tags for this Thread

Posting Permissions