SuperSonic

June 25, 2007 01:33

Revision 126, the first post 2.0.2 check-in, adds an exciting change to the core template engine which will improve the overall usability of SubSonic. I'll get to that in a minute, but first there are a couple more mundane changes that I'd like to mention.

The first of these fixes an issue in 2.0.2 regarding logical deletes. Andrew Rimmer pointed an issue that was introduce with the switch to treat null values as false when handling the special columns. I think that this only represents an issue if your these columns are actually defined as nullable, but please check your results carefully if using this functionality.

The second set of changes are some tweaks to help support the use of SubSonic in medium trust environments. Specifically, these are:

  1. A small modification to the SubSonic AssemblyInfo.cs which was marked as requiring permissions beyond those available in medium trust scenarios.
  2. A change in the tracing behavior. By default, SubSonic tracing is now disabled. Not only does this address medium trust issues, it eliminates a degree of unnecessary overhead in production environments. Tracing can be enabled or disabled across all providers via new service (not provider) level boolean parameter switch, traceEnabled

However, the cool addition in Revision 126 is the newly rewritten template execution engine. The new engine is designed at every turn to eliminate expensive or redundant operations and minimize the number of times the compiler is invoked. Rather than generating the final code by compiling an assembly for each template executed, all templates compiled into a single assembly.

The results are dramatic, in the neighborhood of an 800% improvement. For example, in my environment, the time to generate the code for the default configuration scenario (two providers using the Northwind database), the execution time dropped from 17 seconds to 2.

While this means that you can generate your classes faster, the real benefit is when using the build provider, as it dramatically reduces the time required to compile your project, and eliminate the extended IDE lockup that occurs when performing actions that trigger the build provider, such as editing web.config.

Does it feel faster? Let us know!


5 Comments
Actions: E-mail | Permalink | Comment RSSRSS comment feed

Related posts

Comments

June 25. 2007 04:55

Elden

Sonic.exe wrong. If it contains includeTableList will throw an exception.

Elden

June 25. 2007 08:32

Andrew Rimmer

The speed improvements sound very impressive, looking forward to trying them out.

What is your timetable for getting 2.0.3 out? Do you have a rough target date/period?

Andrew Rimmer

June 25. 2007 10:16

Elden


Generating classes for Default (19 total)
ERROR: Trying to execute generate
Error Message: System.NullReferenceException: 未将对象引用设置到对象的实例。
在 SubCommander.Program.GenerateTables()
在 SubCommander.Program.Main(String[] args)
Execution Time: 1431ms

Elden

June 25. 2007 12:46

Remmus

Smokin!!!!!

I've noticed a massive increase in generation time. Very nice.

Remmus

June 25. 2007 13:04

Eric Kemp

Thanks Elden... That error should be fixed in Rev 128

Eric Kemp

Comments are closed