Robson Amaral

Robson Amaral

  • NA
  • 132
  • 17.3k

Performance problem - Critical points in the system.

Jul 27 2018 12:24 PM
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.
  1. protected void Application_BeginRequest(object sender, EventArgs e)  
  2. {  
  3.     WebSessionContext.Bind(NhibernateHelper.SessionFactory.OpenSession());  
  4. }  
  1. public static ISessionFactory SessionFactory  
  2. {  
  3.     get { return Instance.sessionFactory; }  
  4. }  
  1. class CreateSessionManager  
  2. {  
  3.     internal static readonly NhibernateHelper createsessionmanager = new NhibernateHelper();  
  4. }  
Is there a way to improve? 

Answers (1)