Home > Developing Using CodeFluent Entities > CodeFluent Entities and Fetch Performance Benchmark

CodeFluent Entities and Fetch Performance Benchmark


Two month ago, we heard about a benchmark that fetch performance of .NET Data Access Tools and ORMs. This benchmark has been introduced by Frans Bouma in this following blog post.

We started by creating a simple implementation with CodeFluent Entities and then analyze the result. Thanks to the flexibility of our product, it seems natural for us to provide an optimized but generic implementation. This means that the code is still generated.

CodeFluent Entities provides dynamics modeling features like “Aspects” to implement application-wide behaviors. This is what we call dynamic modeling. In a nutshell, in CodeFluent Entities, dynamic modeling is materialized as aspects and it allows developers to inject extra-behaviors in models.

That’s what gave us the idea of developing a new Aspect called “FasterReader” to reduce the number of data type conversion.
We explained our approach in a blog Post named “Fetch performance of CodeFluent Entities compared to others“.
This Aspect is generic (not “benchmark dedicated”) and can be used in any kind of model.

Once the article is published, we sent a Pull Request on the RawDataAccessBencher GitHub repository to submit the CodeFluent Entities implementation:

pullrequest

The initial commit is available here and includes the CodeFluent Entities Model with the SoftFluent.FasterReader.xml aspect.

We also modified the README.MD file with the following changes:

CodeFluent Entities is a Model-First code generator. CodeFluent Entities will access database using automatically generated stored procedures. For more information about CodeFluent Entities and this benchmark: https://blog.codefluententities.com/2014/03/27/fetch-performance-of-codefluent-entities/.

Of course, this readme includes a link to our blog post that explains the approach.

Then, Frans Bouma asked us to make some understandable changes before merging the code:

  • remove links to CodeFluent Entities website
  • remove a large file with all the procs
  • remove useless files in various folders regarding TFS, scc, resx, .user, etc.
  • remove the CodeFluent Entities Model

For your information about the last statement: we have chosen to add this project to let users generate again the code and to be completely transparent.

Of course, feedbacks has been considered a few days later:

pull_request_changes

At the end of April, the CodeFluent Entities implementation was finally merged:
merge

But… the 5th of May, Frans Bouma removed our code:

CFE_Removal

With the following reason:

The CodeFluent code was removed as it kept the connection open during
individual fetches which therefore turned out to be faster than everyone
else. This was hard to find, and therefore a form of cheating.

By default, CodeFluent Entities opens one connection per thread but we attempted to explain that we can change this behavior. His reaction was the following:

Wont_Merge

You will find below the result with the custom configuration:

ADO.NET’s Connection Pooling keeps all connections open so that doesn’t change a lot of things so we don’t change this setting:

Results

We understand the way out products connects to a database out-of-the-box is not ok for Mr Bouma, but we don’t really understand why he went so mad about this, treating us cheaters. Again, this is how it works out-the-box. Why should we investigate why our product – based on stored procedures – is faster than others? Mr Bouma could have discussed with us – like he did in the beginning of the whole process – and we could have changed this default behavior happily to comply with his rules. We were not trying to make a fool of him or to hide crucial information from him, just compete with other products. It’s a sad way of doing thing, and in the end, this behavior does not change anything to the numbers.

Moreover, if you want to check or test our implementation (the Model is included), please visit the following GitHub repository.

The R&D Team.

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s