Tag: tools

EF Profiler and investigating object context

Summary : EF Profiler worth his money !

Long Description :

I have finished a application with Entity Framework and POCO – and custom generated (.tt) files.

Now it was time to investigate performance  – and it was a terrific problem.

How EF Prof helped me :

1.  Displaying number of ObjectContext created and disposed in a Unit of Work and / or web page.

image

2. Displaying problem with the ObjectCOntext : using same context from multiple threads, alerts about code like  here :

image

The red dot is about querying the database from the view. The gray one is about selecting a whole table without selecting top 1000 rows(OK, it was a dictionary table, like the list of countries)

3. When you want caching on your site , you can fast see this by seeing the difference between the number of queries and/or number of ObjectContext for the first time and the second one ( first time : 10, second time:2 or 0 😉 )

4. See most expensive queries as time – usually this is a good option to put an index on the “where” columns.More , you can see also non-unique queries (that you perform more than 1 time)

5. Investigate easily all queries. Know what you want to optimize and where.

Improvements  :

1. Say where is the ObjectContext that is not closing.

Alternatives:

How to: View the Store Commands : http://msdn.microsoft.com/en-us/library/bb896348.aspx

Sql Profiler : http://msdn.microsoft.com/en-us/library/aa173918%28SQL.80%29.aspx

(free ones :

http://sites.google.com/site/sqlprofiler/

http://code.google.com/p/sqlexpressprofiler/

)

But the job will be done by yourself!

My programmer tools in 2009

you can download the PDF from http://msprogrammer.serviciipeweb.ro/wp-content/uploads/2010/03/tools.pdf

Tool

Description

Link

SharpZipLib Zip files programatically http://www.icsharpcode.net/OpenSource/SharpZipLib/Default.aspx
nunit test http://www.nunit.org/index.php
svn source control http://subversion.apache.org/
hudson continous integration http://hudson-ci.org/
EntityFramework sql server database to .NET code
filehelpers parse csv and other files http://www.filehelpers.com/
log4net logging http://logging.apache.org/log4net/
lumisoft parsing email messages http://www.codeproject.com/KB/vista/SMTP_POP3_IMAP_server.aspx
moq mocking in unit test http://code.google.com/p/moq/
automapper transferring data between dal and bll http://www.codeplex.com/AutoMapper
pagedlist use for paging in ASP.NET MVC http://pagedlist.codeplex.com/
log4postsharp logging every method with easy http://code.google.com/p/postsharp-user-plugins/wiki/Log4PostSharp
postsharp see log4postsharp, version 1.5 still free http://www.sharpcrafters.com/
webdeployment project to deploy web projects http://www.microsoft.com/downloads/details.aspx?FamilyID=0AA30AE8-C73B-4BDD-BB1B-FE697256C459&displaylang=en&displaylang=en
IIS SEO Toolkit verify my sites http://www.iis.net/expand/SEOToolkit
nbehave testing with words http://nbehave.org/
reflector analyze code, others and mine http://www.red-gate.com/products/reflector/
fiddler analyze ajax requests http://www.fiddler2.com/fiddler2
build utilities from apache svn commit if different http://msbuildtasks.tigris.org/
selenium testing web interfaces http://seleniumhq.org/
HtmAgilityPack saving web pages http://htmlagilitypack.codeplex.com/

Utilities

Description

Link

notepad++ no notepad http://notepad-plus.sourceforge.net/uk/site.htm
paint graphic editor
paint.net graphic editor http://www.paint.net/
7zip free archiver-un-archiver http://www.7-zip.org/
sysinternals bunch of windows utilities http://technet.microsoft.com/en-us/sysinternals/default.aspx
windows live writer blog http://download.live.com/writer
psr.exe new method to create help
logparser parse fast files http://www.microsoft.com/downloads/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07&displaylang=en
foxitreader pdf reader www.foxitsoftware.com/pdf/reader
yahoo instant messaging www.yahoo.com
skype instant messaging http://www.skype.com/intl/en/
dosbox old games redivivus http://www.dosbox.com/
vlc movie player http://www.videolan.org/vlc/
dvddecrypter and dvdshrink backup my movies http://www.mrbass.org/dvdrip/
magicdisk load iso files http://www.magiciso.com/tutorials/miso-magicdisc-overview.htm
freecommander norton commander http://www.freecommander.com/
winmerge compare files / folders http://winmerge.org/downloads/

Firefox addons

https://addons.mozilla.org/en-US/firefox/collection/ignatandrei

firebug
yahoo slow
webdeveloper
weave
morningcofee
measureit
htmlvalidator
faviconizetab
exchangebcebnr
colorzilla
addoncollector
googlenotebook
downloadstatusbar
goolepagespeed

As I was saying, you can download the PDF from http://msprogrammer.serviciipeweb.ro/wp-content/uploads/2010/03/tools.pdf

Andrei Ignat weekly software news(mostly .NET)

* indicates required

Please select all the ways you would like to hear from me:

You can unsubscribe at any time by clicking the link in the footer of our emails. For information about our privacy practices, please visit our website.

We use Mailchimp as our marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp's privacy practices here.