Monday, December 31, 2012

Saturday, December 29, 2012

What you need to know about performance in Entity Framework


http://msdn.microsoft.com/en-us/data/hh949853.aspx 

Mapping Views
Mapping views are set of SQL statements that represents the database in an abstract way, which are also part of the metadata.
link1, link2

Query execution
Deferred vs. Immediate execution
Client side execution of LINQ queries
Query and mapping complexity
Mapping complexity
Query complexity
Relationships
Query paths
Saving changes
Distributed Transactions


Strategies for Performance improvement

Pre-generate views
Consider using NoTracking merge option for queries
Return the correct amount of data
Limit the scope of ObjectContext
Consider opening db connection manually.

Extra

  • In EF its best to understand how query execution happens 
  • Data Source is the one which provides connection pooling facility. Not the Entity Framework. The .NET provider for SQL Server provides support for Connection Pooling
  • In previous versions of EF (before 6) there was a performance problem when using Contains. This has been fixed now.

https://msdn.microsoft.com/en-us/data/hh949853.aspx
http://www.asp.net/web-forms/overview/older-versions-getting-started/continuing-with-ef/maximizing-performance-with-the-entity-framework-in-an-asp-net-web-application


http://www.asp.net/whitepapers/aspnet-data-access-content-map#gettingstarted


Saturday, December 8, 2012

Stuff you need to know about JavaScript

JavaScript has lot of concepts around it. There are things that you might miss out. Lets see some of them.

  • In JavaScript there are some variables starting as __ (__defineGetter, __defineSetter, __proto__). These are variables defined by the browser and are not defined by ECMAScript #convention (link2)
  •  Best practice to define libraries is to define one global variable (google, jquery) and define all your methods/variables within the scope of that object
  • JavaScript curry
  • Adding custom headers to JQuery AJAX request
  • Browser closing events
    • http://stackoverflow.com/questions/1119289/how-to-show-the-are-you-sure-you-want-to-navigate-away-from-this-page-when-ch
    • http://stackoverflow.com/questions/2076299/how-to-close-current-tab-in-a-browser-window
  • http://stackoverflow.com/questions/4869613/solutions-for-distributing-html5-applications-as-desktop-applications

Scope and Context in JavaScript

Powered by Blogger.


Software Architect at Surge Global/ Certified Scrum Master

Experienced in Product Design, Software Engineering, Team management and Practicing Agile methodologies.

Search This Blog

Facebook