[CLOSED] User Controls & Performance problems - Urgent

  1. #1

    [CLOSED] User Controls & Performance problems - Urgent

    Last edited by Daniil; Jun 14, 2012 at 8:50 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Quote Originally Posted by andreasperanza View Post
    and data that populates gridpanel are loaded on the expand event of the fieldsets;
    Well, I have to disagree. I can't see where you load a data in the Expand listener.

    You should set up
    AutoLoad="false"
    for the Store and call its client side load method to cause a data to be loaded.

    Also how many records do you load? I guess many. If so, I would recommend to organize remote paging.

    Another optimization step could be rendering the content of collapsed containers on the fly from server.

    All of these steps can cause a big performance improvement.

    Disabling ViewState if it is not required can also help a lot.

    Some other advices and concrete steps you can find in the links below.

    See also
    http://forums.ext.net/showthread.php?13726
    http://forums.ext.net/showthread.php?15699
    http://forums.ext.net/showthread.php?17187
    http://forums.ext.net/showthread.php?15712
  3. #3
    Please use a profiler to determine which exactly code overloads the server.

    Also please note that all defined in markup controls are recreated on each DirectEvent or DirectMethod (non static). So, we would recommend to move the logic out from the page to web services and/or HTTP handlers.
  4. #4
    Quote Originally Posted by Daniil View Post
    Please use a profiler to determine which exactly code overloads the server.

    Also please note that all defined in markup controls are recreated on each DirectEvent or DirectMethod (non static). So, we would recommend to move the logic out from the page to web services and/or HTTP handlers.
    Hi Daniil,
    thanks for the quickly response.
    I'm tryng to do the optimiziation suggested in the posted threads and to measure the beneficts.
    We used the Visual Studio 2010 Performance Profiler, and the attached file show the result.
    As you can see, the Regex.Replace is the function that do the most individual work; we don't use this function un our project so i think this is used by Ext.Net; can you describe me which is then scope of the function?How can we optimize that?Any IIS 7 hint to configure?

    Thanks
    Attached Thumbnails Click image for larger version. 

Name:	Profiler.png 
Views:	186 
Size:	35.5 KB 
ID:	4346  
  5. #5
    I'm going to assume you are loading a Page with A LOT of Controls. It's going to be important to reduce the number of Controls that initially loaded.
    Geoffrey McGill
    Founder
  6. #6
    Regex.Replace is used to transform output html in Ext.Net widgets.
    Can you send us (vladimir@object.net) test project which has issue with performance? We will test it to understand possible bottle necks in Ext.Net code
  7. #7
    Quote Originally Posted by Vladimir View Post
    Regex.Replace is used to transform output html in Ext.Net widgets.
    Can you send us (vladimir@object.net) test project which has issue with performance? We will test it to understand possible bottle necks in Ext.Net code
    Thanks wladimir.
    Now we'll prepare a significative test project, but it takes a lot of time; meanwhile have any idea about a possible configuration of the web server IIS 7?
    For example, how caching can impact the performance?

    In this moment our application can't go on-line 'cause the terrible performance; this should have impact to subsequent project that will be developed for the same (critical) customer, so it's possible to ask your direct advice (on the site)?
  8. #8
    There is no universal solution, it is always required to investigate code before any advising.
    I can get only few suggestions:
    - render controls on demand instead on initial page load
    - bind data on demand instead on initial page load
    - if data contains many record then use remote paging
    - use static direct methods instead instance direct methods
    - move logic (direct events) out the page to http handlers or web service
    - reduce ajax requests as much as possible (try to do on the client side (via javascript) as much as possible)
  9. #9
    Quote Originally Posted by Vladimir View Post
    There is no universal solution, it is always required to investigate code before any advising.
    I can get only few suggestions:
    - render controls on demand instead on initial page load
    - bind data on demand instead on initial page load
    - if data contains many record then use remote paging
    - use static direct methods instead instance direct methods
    - move logic (direct events) out the page to http handlers or web service
    - reduce ajax requests as much as possible (try to do on the client side (via javascript) as much as possible)
    Just some clarifications:
    1) render controls : this means to add contrls instead to use the ascx?
    2)bind data : ok, we do it now
    3) we get no many records
    4) static direct methods : what does it mean?
    For example we have this Direct Method
    [DirectMethod()]
            public bool AfterEdit(string field, string oldValue, string newValue, object timbratura)
    It must become
    [DirectMethod()]
            static public bool AfterEdit(string field, string oldValue, string newValue, object timbratura)
    It's correct?
    5) move logic to http handlers/web service : the solution is not viable because it's a great impact
    6) reduce ajax : please should you clarify this point?Aren't direct methods ajax requests?

    Thanks in advance
    Last edited by Daniil; Jun 11, 2012 at 2:11 PM. Reason: Please use [CODE] tags
  10. #10
    Quote Originally Posted by andreasperanza View Post
    1) render controls : this means to add contrls instead to use the ascx?
    No, you can still use user controls.

    Generally, Vladimir meant:
    https://examples1.ext.net/#/XRender/Basic/Add_Items/
    https://examples1.ext.net/#/XRender/Basic/New_Window/
    https://examples1.ext.net/#/XRender/..._Add_Children/
    https://examples1.ext.net/#/XRender/...UpdateContent/

    Quote Originally Posted by andreasperanza View Post
    3) we get no many records
    Please clarify how many?

    By the way, amount of columns can also affect on rendering speed. I see 12 columns in your grid. Well, it is not so little. Though not many as well.

    Quote Originally Posted by andreasperanza View Post
    4) static direct methods : what does it mean?
    For example we have this Direct Method
    [DirectMethod()]
            public bool AfterEdit(string field, string oldValue, string newValue, object timbratura)
    It must become
    [DirectMethod()]
            static public bool AfterEdit(string field, string oldValue, string newValue, object timbratura)
    It's correct?
    Yes, DirectMethod with the "static" modifier.

    Please see #4 here.
    https://examples1.ext.net/#/Events/D...hods/Overview/

    Quote Originally Posted by andreasperanza View Post
    6) reduce ajax : please should you clarify this point?Aren't direct methods ajax requests?
    DirectMethods and DirectEvents are AJAX requests.

    Vladimir meant reducing amount of AJAX request including DirectMethods/DirectEvents.

    Many things you can do directly on client via JavaScript. So, if something can be done on client, do not make an AJAX request.

    For example, you can hide some Panel on server in DirectMethod or DirectEvent
    this.Panel1.Hidden = true;
    or just on client via JavaScript:
    Panel1.hide();
    So, you will avoid executing the common Page life cycle.

    Hope this helps.
    Last edited by Daniil; Jun 11, 2012 at 2:27 PM.

Similar Threads

  1. Replies: 12
    Last Post: Mar 24, 2011, 5:38 PM
  2. [CLOSED] performance problems
    By ATSistemi in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: May 25, 2010, 12:28 PM
  3. controls inside panel urgent help
    By bilgecooliteforum in forum 1.x Help
    Replies: 1
    Last Post: Apr 29, 2010, 12:28 PM
  4. Urgent please Binding asp.net controls
    By miguelp120 in forum 1.x Help
    Replies: 2
    Last Post: Apr 21, 2010, 4:20 PM
  5. Serious Performance issues - ViewPort - Urgent
    By sairashid in forum 1.x Help
    Replies: 4
    Last Post: Jul 29, 2009, 2:54 PM

Tags for this Thread

Posting Permissions