NOODB: Performance Glitch Fixed

Last night, I wrote the import methods to get the DvdFriend data into a NOODB database.

Today, I created a simple ASP.NET page that binds to the NOODB client and does a search.

Oh, by the way, I added these 3 query operators

  1. Contains
  2. StartsWith
  3. EndsWith

I needed the Contains to do the search.

Anyway, back on track. Once it was wired up, I was disheartened at the results. It’s one thing to see an import of a movie review taking 95ms. It’s another thing to see a very noticeable delay when you press the search button. A significant delay. I compared it to the live DvdFriend, which comes back instantaneously. Bummer.

So, I had to look into it. I found a very simple problem; the meta cache was reloading on every hit to the server. Doh! That’s not very good use of a cache. I updated the unity configuration to set the lifetime management to singleton (ContainerControlledLifetimeManager).

That made a massive difference, as it should have. Now, I am quite pleased with it. The records come back as fast as you can hit the enter key. Sweet.

I reran the imports from last night. The first two were the same. The third one, Movie Reviews, improved from 95ms to 22ms. Nice.

I thought it was time to really focus on the performance

  • Remove the custom serializer
  • Batch sql inserts/updates

I thought that list would have more bullets on it, but that’s all I can think of. I guess the third bullet would be to profile it and see what else I can work on.

In conclusion: good news. Visually, I can’t tell the speed difference between using NOODB and the existing site.

noodb

Advertisements

One Response to NOODB: Performance Glitch Fixed

  1. hamletcode says:

    I thought of one of the other optimizations… caching of the CTEs. Currently, it rebuilds the CTE it needs for each query.

    I also fully plan on inserting a cache layer, but that’s more of a brand new feature than an optimization.

Leave a Reply

Please log in using one of these methods to post your comment:

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

%d bloggers like this: