Telerik blogs

JustCode emphasizes not getting in your way.  From the customizable Visual Aids, to making sure the UI clues are subtle (but user friendly), and processing all of the code analysis  on background threads, your productivity is our primary concern.  So why does Visual Studio take longer to start and load projects when JustCode is installed?  Although we have done a lot to minimize this, there are two distinct reasons why you might experience start up slowdowns.

Visual Studio Startup Initialization

When you start Visual Studio for the first time after installing JustCode, JustCode creates a MEF (Managed Extensibility Framework) catalog of all of the assemblies in the JustCode installation folder. This process can take up to four or five seconds, but only happens on that first launch of Visual Studio.  After the catalog is built, there is no longer any start up slowdown. This catalog enables JustCode to perform it’s operations much faster.

When you install a newer version of JustCode (e.g. quarterly updates), there will be a small hit while the MEF catalog is rebuilt.  The amount of time will depend on the amount of changes in the new version.

Opening a solution in Visual Studio

JustCode performs two tasks when you open a solution in Visual Studio with JustCode enabled, both of which enable faster performance when you are working in Visual Studio.

Task 1 - Gathering Solution Data

JustCode gathers a lot of information about your solution.  This includes all of the projects, files in each project, references, build actions for of all the files, plus much more. All of this information is necessary for the code analysis, navigation, and all of the other productivity features you’ve come to enjoy from JustCode. Of course this makes perfect sense to analyze the data on solution load, so it’s ready when you are.

However, the Visual Studio objects containing solution information are COM objects. So every time JustCode needs to access a property, call a method or do whatever function is needed, it is a COM call.  And, as we can all remember from those days of working with COM, COM can be slow.

If your solution is small to moderate, you probably won’t even notice anything.  If you have a fairly large solution, this startup cost can be noticeable. 

Our engineers have met with the Visual Studio engineers, and, unfortunately, this situation isn’t going to change in the near future. 

Task 2 - Pre-analyzing Solution Data

Now that all of the solution data has been gathered, JustCode needs to analyze it.  All of the solution information gathered in Task 1 (Gathering Solution Data) as well as the assemblies referenced by the solution (and the references for those references) need to be added to the solution cache.  This process is very quick, but again, if you have a very large solution, this process can add to the small delay when you first open a solution.

Summary

Life is a series of trade-offs.  If the heavy lifting for the productivity gains JustCode provides is done while you are writing code, than it’s not much of a gain if you have to wait for the analysis to catch up with your typing, or worse, you must turn off solution wide analysis all together.  JustCode does a lot of pre-analyzing when you first start Visual Studio or open a solution so you can deliver more than expected. 

NOTE: Special thanks to Ivan Spasov, one of our incredibly smart engineers who helped me with the technical details of the startup process for JustCode.

JustCode download banner image


Japikse
About the Author

Phil Japikse

is an international speaker, a Microsoft MVP, ASPInsider, INETA Community Champion, MCSD, CSM/ CSP, and a passionate member of the developer community. Phil has been working with .Net since the first betas, developing software for over 20 years, and heavily involved in the agile community since 2005. Phil also hosts the Hallway Conversations podcast (www.hallwayconversations.com) and serves as the Lead Director for the Cincinnati .Net User’s Group (http://www.cinnug.org). You can follow Phil on twitter via www.twitter.com/skimedic, or read his personal blog at www.skimedic.com/blog.

 

Comments

Comments are disabled in preview mode.