Quantcast
Channel: Developer Express Inc.
Viewing all articles
Browse latest Browse all 2370

CodeRush for Roslyn (preview)

$
0
0

So the entire team has been working hard on CodeRush for Roslyn. This endeavor is huge: Hundreds, if not thousands of language-based features, replacing our core engine with Roslyn’s core engine, and porting tens of thousands of test cases.

Based on what we’ve seen so far, the end results, extremely efficient use of memory, even faster performance, and more, appear to justify the effort.

The Plan

The DevExpress 15.1 release includes two CodeRush products:

  1. CodeRush Classic15.1 (previously known as simply CodeRush). This is the same CodeRush we’ve shipped for years. It includes the full feature set, however 15.1 will not include support for C# 6 and VB 14 language features.
  2. CodeRush for Roslyn (CRR) 1.0 preview. CRR will not include the full CodeRush 14.2 feature set (more details below), however it will include full support for C# 6 and VB 14 language features (and beyond).

The Future of CodeRush Classic

At some point in the future, when we have ported the entire CodeRush Classic feature set to CRR, we intend to deprecate CodeRush Classic. We will continue to support and fix issues in CodeRush Classic for some time beyond this deprecation point, however CodeRush Classic is unlikely to ever get support for new language features (e.g., C# 6, VB 14, and beyond).

Which CodeRush Should I Use?

If you’re working in Visual Studio 2015 with the new language features in C# or VB, you should install CodeRush for Roslyn. If you rely on CodeRush Classic features that haven’t been ported yet, you’ll need CodeRush Classic. If you need both, you can install and use both (more on this in later posts).

Benefits

There are three significant benefits you can expect from CodeRush for Roslyn:

Massive Reduction in Memory Consumption

Refactoring tools need to understand the code. And to refactor and find references quickly, you need to parse the solution source. And that means memory. The bigger the solution, the more memory you need. In CodeRush Classic and in competing tools which have decided not to support Roslyn, the memory required is essentially doubled as the Visual Studio host is also parsing and storing similar results. Owners of huge solutions were hit hard when using tools like CodeRush Classic. With CodeRush for Roslyn, this doubling-up memory waste is a now thing of the past.

To see this savings in action, we created two benchmarks using the following hardware and software:

Machine: Intel® Core™ i7-363QM CPU, 2.40 GHz, 8GB RAM, SSD HD 
OS: Windows 8.1 Enterprise 64-bit
Software:

  • Visual Studio v14.0.22823.1 D14REL
  • CodeRush for Roslyn v0.9
  • Competing Product v9.1

Solutions Tested:

Benchmarks:

  1. Memory.

    Prep: Open solution. Build. Close all documents. Only Solution Explorer and Properties windows are active. Close solution. Close Visual Studio.

    Memory Test: Start Visual Studio, open solution, wait until devenv.exe process CPU usage falls to 0. Calculate managed memory using VSIX plug-in.

  2. Performance.

    Prep: Open Visual Studio with Start Page opened. Wait until all extensions are successfully loaded.

    Performance Test: Click the solution link the solution in the Recent tab and start the timer. Stop the timer when the solution loading progress bar is complete. For VS and CodeRush the progress bar appears in the Solution Explorer. Competing products may place a progress bar in the lower-left corner of the VS status bar.

At DevExpress we have a policy of not mentioning competing products on our site, so I can’t reveal the name of the product we compared CodeRush to. However I can tell you the version number of the competing product we tested was 9.1, and I can tell you the competing product is one that has previously announced they would not exploit the Roslyn engine (which means you would expect their memory usage to be noticeably higher than Visual Studio’s).

Results of the memory tests:

MemoryUse

For the small solution, DotNetOpenAuth, CodeRush uses only 6MB.

For the medium-sized solution, Orchard, CodeRush uses 13MB.

And for the large solution, opening the source code to Roslyn itself, CodeRush uses 55MB.

Faster Performance

Not only was CodeRush Classic storing essentially the same results as Visual Studio was, it was also parsing the same code a second time (just like some competing tools still do). That waste stops with CodeRush for Roslyn. Every feature works noticeably faster and feels snappier, while CRR adds only 0-2 seconds to solution-open times:

 SolutionOpenTimes

Better Language Support

Expect CodeRush for Roslyn to immediately understand and support new C# and VB language features as they are released by the Visual Studio team.

Support for Languages Beyond C# and VB

CodeRush for Roslyn will include parsers and code generators from the CodeRush Classic engine for any languages that Roslyn doesn’t support yet, including XAML, CSS, HTML, and XML. As Roslyn adds support for these languages, We’ll update CRR accordingly to exploit the new support, which should result in additional memory reduction and faster performance.

What’s really exciting, is that as the Visual Studio team and third parties move new languages under the Roslyn engine, you can expect CodeRush for Roslyn to understand those as well. There may be some changes required on our side to support the new languages, however the effort is a small fraction of what it was before Roslyn.

The Preview is Free

Today we’re releasing an early preview of CodeRush for Roslyn on the Visual Studio Gallery. We intend to release updates every four weeks as we approach the final release. The install is VSIX-based, which means updates are quick and easy and can happen from inside Visual Studio.

What’s New

In addition to a port of CodeRush classic features (see below for details), CodeRush for Roslyn also includes two new features.

IntelliRush Hierarchical Filtering

In this release IntelliRush gets a great new feature, Hierarchical Filtering. This lets you slice up the Intellisense hierarchy to only see entries from specified classes in the ancestry.

IntelliRushHierarchicalMenu

 

Code Coverage

The Code Coverage window shows which lines of code are covered by test cases and which are not.

 image

Features Ported from CodeRush Classic

Features included in the CodeRush for Roslyn (preview):

 image

 image

We Need Your Feedback

Let us know what you love, what you’re missing, and what you’d like changed. When CodeRush for Roslyn is published (awaiting final approval from the powers that be), it will be available here.


Viewing all articles
Browse latest Browse all 2370

Trending Articles