locked
Performance problem - Critical points in the system. RRS feed

  • Question

  • User662762443 posted

    I discovered that in the visual studio tool, has Analyze, which shows the critical points in the code, and it was verified that the time consumption is in those queries referring to the dll of the code below, how could I improve that part in my code?

    Name
    | + SDPJView.Global.Application_BeginRequest(object,class System.EventArgs)

    Inclusive Allocations
    79.667

    Exclusive Allocations
    0

    Inclusive Bytes
    4.262.010

    Exclusive Bytes
    0

    Inclusive Allocations %
    5,96%

    code:
    These are my 3 critical points.

    protected void Application_BeginRequest(object sender, EventArgs e)  
            {  
                WebSessionContext.Bind(NhibernateHelper.SessionFactory.OpenSession());  
            }  
    public static ISessionFactory SessionFactory  
            {  
                get { return Instance.sessionFactory; }  
            }  
    class CreateSessionManager  
            {  
                internal static readonly NhibernateHelper createsessionmanager = new NhibernateHelper();  
            }  

    Is there a way to improve?



    Friday, July 27, 2018 5:37 PM

All replies

  • User1120430333 posted

    And this has something to do with an ORM? How?

    Saturday, July 28, 2018 7:58 PM
  • User662762443 posted

    Friend DA924, thanks for contributing here in my thread. I have a system that is to import a spreadsheet containing many records, and to improve a little of the performance I decided to study about the threads and so on, and I decided to apply in practice, where it helped a good part, improving somewhat the system performance, but as a precaution I decided to use the tool available in visual studio 2017 called Analyze to check if there was something critical in the performance of my system, then it was verified that it really existed, yes, I believe it is in the ORM, but the critical situation refers to this part of my nhibernate code:

    Monday, July 30, 2018 5:13 PM