ResourceManager taking 18 seconds to load

  1. #1

    ResourceManager taking 18 seconds to load

    I am using Ext.Net 4.2 and Visual Studio 2017 with Net framework 4.6.1. The following line of code in the
    view is taking around 18 seconds to load. Does anyone know what could be causing this?

    @Html.X( ).ResourceManager( ).CleanResourceUrl( true ).ShowWarningOnAjaxFailure( false ).AjaxTimeout( 130000 )
  2. #2
    Hello @edip!

    Tried here a simple page using the line as you suggested, and it loads in a matter of moments. I don't see any reason for that to take 18 seconds other than a very heavy load on the machine running the webserver (be it IIS Express or standalone IIS).

    I rebuilt the project from scratch (so IIS Express would reload WebConfig, DLLs and resorces) and the first load took 6.05s. The following 5 reloads (force-reloads) took, respectively, 502ms, 522ms, 501ms, 490ms and 496ms.

    I believe you have tried this on a clean project, free of any other interference? If not, there could be some third-party libraries holding back and delaying the page load.
    Fabrício Murta
    Developer & Support Expert
  3. #3
    Hi Fabricio,
    I have further debugged this issue and it seems to be taking all the time in the Ext.Net class named
    in the following Ext.Net method..,
            public static MvcDirectMethod[] GetMethods()
                string str = "Ext.Net.MVC.DirectMethods";
                List<MvcDirectMethod> list = null;
                HttpContext current = HttpContext.Current;
                if (!IsDebugging)
                    list = current.Cache[str] as List<MvcDirectMethod>;
                return list?.ToArray();
    and more specifically on the line...
    list = current.Cache[str] as List<MvcDirectMethod>;
    which is very strange since i can cast it with the following line which does the same thing and it returns immediately

    (System.Collections.Generic.List<MvcDirectMethod>) current.Cache[str]
    happens to be null
  4. #4
    Just to add to the mystery, if i run that same line of code in the immediate window, it returns immediately...
     list = current.Cache[str] as List<MvcDirectMethod>
  5. #5
    Hello @edip!

    If you want to add up to the mystery, I see the method you pointed in Ext.NET is slightly different than what you pasted! It really seems you are not using the same Ext.NET DLL that is provided by us, or you have a modified one.

    Please try and track down where you are finding this method (the file), you will probably find it elsewhere not in Ext.NET code base.
    Fabrício Murta
    Developer & Support Expert
  6. #6
    Hello Fabricio,
    I am using code generated by Net Reflector. I do not have the actual source for Version 4.2.1 of Ext.Net. If i can get the source, i can try that if you like.

  7. #7

    Well, mystery solved!.. At least that one, because here, if I apply instrumentation to Ext.NET DLL I get Ext.Net.MVC.MvcDirectMethod.GetMethods() run in 7.99ms, meaning 1.02% elapsed includive time and 0.02% elapsed exclusive time. It gets called just once per load.

    Using a page as you suggested.

    Again, please run Ext.NET on a clean MVC project. You have something specific on your project that is slowing down the whole thing. Probably some setting related to session state. One example, you could be using session state from a database, and this database being from a network endpoint. If the network gets slow or the query delayed, it could take an arbitrary amount of time to load.

    Of course, the example above is hypothetical, not likely to be your case, but I can't see something with Ext.NET itself being the reason the slowdown on your website. If you google for performance issues versus using HttptContext.Current.Cache you'll probably find some useful insight about ways to work on your issue.

    I hope this helps!
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Replies: 2
    Last Post: Feb 22, 2014, 12:53 AM
  2. [CLOSED] First Request taking too much time to load page
    By shaileshsakaria in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 06, 2013, 7:56 PM
  3. Replies: 17
    Last Post: Dec 29, 2012, 6:25 AM
  4. Replies: 14
    Last Post: Sep 27, 2012, 12:57 PM
  5. Windows resize when load ResourceManager
    By slonati_adv in forum 2.x Help
    Replies: 0
    Last Post: Jun 21, 2012, 7:23 AM

Tags for this Thread

Posting Permissions