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?