Blogs

Mark Miller

Performance and Memory Milestones in CodeRush and Refactor! Pro - Preview of 9.2

The IDE Tools team has been spending a great deal of time making CodeRush and Refactor! Pro run even faster and with less memory. With every release since 3.2.3, customers have noticed improvements in speed. And it's no different for CodeRush 9.2, expected later this quarter.

Performance

Our primary focus for performance in this release has been solution load times. Specifically, we want to reduce the time it takes to go from specifying a solution to open in Visual Studio to the ability to refactor anywhere that a solution (we call this "zero-to-refactor" time). Refactoring anywhere means CodeRush has a full understanding of all the code in the entire solution.

To give you an idea of what you can expect in CodeRush 9.2, we took some measurements of this zero-to-refactor time with three of our internal DevExpress solutions. Two of these solutions are among our largest: DX Controls (8000+ files, anyone? Holy crap!) and XAF. The third is a medium-sized project, XtraScheduler. The table below gives you an idea of their respective sizes using a variety of metrics:

 

DX Controls

XAF

XtraScheduler

# of Projects

51

54

9

# of Files

8,056

1,980

660

# of Types

17,351

4,295

2,235

# of Members

209,384

32,250

22,215

Lines of Code

1,831,086

255,759

389,954

Source Size

84MB

16MB

18MB

 

 

 

 

 

 

 

 

 

How do your solutions compare to these?

 

Some details on the test machine:

Processor

Intel Core 2 Duo E6400, 2.13 GHz

Memory

2 GB

Hard disk drive

Seagate st3250824as, 7200 RPM

(8ms average seek time,

9ms average write time)

Operating system

32-bit Vista, SP1

And it's Windows Experience Index:

 WindowsExperience

 

First Time Loads

When you first open a solution, CodeRush 9.2 parses it and caches important information using a background thread. The cache later improves the zero-to-refactor time for subsequent loads of the same solution.

The parse and cache-building times for first-time loads for each of the solutions in CodeRush 9.2 are about the same as the old parse times (and no cache building) for CodeRush 9.1:

 FirstTimeLoad3

Even though CodeRush 9.2 performs additional functionality on the first-time load (e.g., parsing the code and building the cache), the team has actually found ways to improve the parsing speed sufficiently so as to have an overall effect of marginally reducing the zero-to-refactor time.

 

By the way, if you are looking at that 200-second parse and cache-building time for the DX Controls project and on the verge of freaking out, you may find relief in the following:

  1. That time is from zero (no solution open) to the ability to instantly initiate a refactoring anywhere (no build required).
  2. This is all happening in a background thread. Visual Studio remains responsive during this time.
  3. The DX Controls solution declares over seventeen thousand types and over two hundred thousand members. It's 84MB of source code and nearly two million lines of code long. This solution is significantly larger than most solutions out there.
  4. This cache-construction stage only occurs once -- the first time you open a solution without a cache.
  5. This zero-to-refactor performance for first-time solution loads is actually comparable if not significantly faster than the competition.

Subsequent Loads

For subsequent solution loads after the cache is built, the story is even better:

SubsequentLoad2 

Notice that once the cache is built, subsequent times to load a solution and get from zero-to-refactoring for CodeRush 9.2 (middle row in red) approach those of Visual Studio's normal load time for the solution (front row in blue).

The bottom line is CodeRush 9.2 gets you to that point of total code understanding where you can refactor anywhere significantly faster than CodeRush 9.1. In some cases up to five times faster.

Memory Consumption

Remarkably, the memory story is even more compelling than the performance story.

The data below shows total Task Manager memory after loading one of these large solutions and reaching that point where we're able to refactor anywhere in the solution (all source code has been parsed). Measurements were taken with Visual Studio 2008 alone (no add-ins), and with CodeRush 9.1 and CodeRush 9.2.

MemoryConsumption2

By the way, if you're using a competing IDE productivity tool and wondering how much memory that other tool might be consuming, it's likely to be very close to the memory consumed by CodeRush 9.1 (see the back row in purple).

Notice the significant drops in memory consumption produced by CodeRush 9.2 (middle row in red) compared to the memory consumption of CodeRush 9.1 (or your other IDE productivity tool). The savings in memory is huge, especially considering the size of these projects and the fact that this memory also holds all the assemblies required simply to keep CodeRush (and Refactor! Pro) running.

The percentage numbers in white near the top of each bar show how much additional memory is required by CodeRush (to represent the entire solution as well as its referenced assemblies) as a percentage of that needed by Visual Studio alone (if you didn't have CodeRush installed).

Whereas CodeRush 9.1 (in purple) requires about double the memory Visual Studio needs, CodeRush 9.2 requires substantially less. We expect most customers with large solutions to see a reduction in memory consumption of at least 100MB. Customers with very large solutions (e.g., 2000 files and up) should see even greater savings.

Can I Try This Now?

Yes you can. Between now and the release of CodeRush 9.2, CodeRush customers can request a daily build of CodeRush 9.2 from support@devexpress.com.

Published Jun 17 2009, 12:10 PM by
Filed under: , ,
Bookmark and Share

Comments

Rory Becker - DevExpress

Erm how can I put this delicately.......

Hmmm ... I can't......

So I'll just go with the first thing that entered my head....

"Holy Crap that's amazing!! Can't wait to get my hands on a copy. :D"

June 17, 2009 2:05 PM

Jim Clay

I think Rory summed it up appropriately.  Can't wait for the release.

June 17, 2009 3:34 PM

Crono

That is very impressing! :D

June 17, 2009 3:51 PM

Anders

How about VS2010 support?

Everyone thinking it  - I'm just saying it.

June 17, 2009 4:37 PM

Mark Miller (DevExpress)

Hi Anders,

We expect to deliver CodeRush for VS 2010 the same day it ships, however Dev 10 is a moving target, and there is still much work to do before we release. Regardless, the benefits shown in this post also apply to CodeRush on VS 2010 (as well as the next update to CodeRush Xpress), since the same low-level code is running in all of these versions.

June 17, 2009 5:46 PM

Peter Thorpe

Fantastic work as always, your effords to improve the speed and efficiency of code rush and refactor pro are certainly appreciated.  As my solution file has gained extra projects I have been noticing increased load times, not only due to code rush and refactor pro but certainly not helping.

June 17, 2009 6:41 PM

Jóhann Ólafsson

Cool stuff.

btw are any of these performance benefits available in the current daily builds?

June 18, 2009 7:14 AM

randall haehnel

Is it a safe assumption that these changes will also make QuickNav more responsive when using large solutions?

I have requested a daily build, but have not heard back yet.

June 18, 2009 9:11 AM

Scott G Blood

Guys,

The one thing that has stopped me from using CodeRush or RefactorPro has been the huge memory consumption and the sluggishness i used to get in visual studio when these 2 products were installed.

This sounds like a huge step in the right direction and the mind just boggles at how good you guys must be to write a parser for the .net runtimes :)

Cant wait to now try the official release version of this.

Cheers.

June 18, 2009 9:59 AM

Dew Dump – June 18, 2009 | Alvin Ashcraft's Morning Dew

Pingback from  Dew Dump – June 18, 2009 | Alvin Ashcraft's Morning Dew

June 18, 2009 10:07 AM

Mark Miller (DevExpress)

Jóhann: Yes, these benefits are available now in the 9.2 daily builds available to customers.

Randall: Yes, Quick Nav should be more responsive in large solutions. If your experience is otherwise, let support know.

June 18, 2009 1:21 PM

Zack Jones

Thanks guys, now I no longer have an excuse to go get another cup of coffee while my project loads :). I promote CodeRush to all developers I meet. Thanks for putting out such a fantastic tool for us.

June 19, 2009 8:42 AM

Rory Becker - DevExpress

I have recently done a test of my own, and was very impressed with the effects, even on my own relatively small solution.... rorybecker.blogspot.com/.../coderush-920-speed-and-memory.html

June 19, 2009 9:15 AM

Andy

Wow - Great news to come in a longtime

June 23, 2009 12:06 PM

Mark Miller

Here's what you can expect in the CodeRush 9.2 release. Faster Performance A new symbol cache, built

July 15, 2009 8:02 PM

ctodx

We're just about to release v2009.2 and it would be a good idea to have an "accumulator"

August 20, 2009 8:30 PM

PressReleases

DevExpress technologies for Visual Studio help you build your best, reduce the amount of code you write,

August 28, 2009 2:11 PM

Visual Studio Add-in Comparison: CodeRush & Refactor! Pro « Danijel Malik's blog

Pingback from  Visual Studio Add-in Comparison: CodeRush & Refactor! Pro « Danijel Malik's blog

February 1, 2010 8:14 PM

About Mark Miller (DevExpress)

Mark Miller is a C# MVP with strong expertise in decoupled design, plug-in architectures, and great UI. Mark is Chief Architect of the IDE Tools division at Developer Express, and is the visionary force behind productivity tools like CodeRush and Refactor!, as well as the DXCore extensibility layer for Visual Studio. Mark is a popular speaker at conferences around the world and has been writing software for over two decades.
LIVE CHAT

Chat is one of the many ways you can contact members of the DevExpress Team.
We are available Monday-Friday between 7:30am and 4:30pm Pacific Time.

If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

FOLLOW US

DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

Copyright © 1998-2014 Developer Express Inc.
All trademarks or registered trademarks are property of their respective owners