Skip to main content

Posts

Showing posts with the label performance

Performance improvements when creating NpgsqlConnection objects

Recently,  I applied a patch from  Kevin Pullin  which will improve the performance of programs using Npgsql. This patch reduces significantly the time to create new NpgsqlConnection objects. This particularly applies in scenarios where you are creating and disposing a lot of NpgsqlConnection objects, like when  you are using connection pool , ( you are using it, right? :) ). Comparison test I made an artificial test to show the impact of this patch. This test consists of a simple loop where I create 10k NpgsqlConnection objects.  class   Program     {          static   void   Main ( string []  args )         {              var   connString   =   "server=127.0.0.1;userid=npgsql_tests;database=npgsql_tests;" ;        ...

Function call performance optimizations

On my last post about that subject , I wrote about some optimizations I did to get better performance when calling functions with Npgsql. While that optimizations were very nice, they had a drawback: you had to reuse your NpgsqlCommand object. You had to reuse it because the optimizations were based on cached data and if you created a new NpgsqlCommand object the data would need to be cached again. In the general case, where you would create many NpgsqlCommand objects and call functions with them, you would not benefit from those optimizations. In order to fix that, Noah Misch created a patch which remove 2 of the 3 internal calls which were giving performance problems. The only case left is for functions which have return type of 'record'. We are working to get this case also covered. I'm going to show here how much performance improvement you get with this patch with a simple call to a function which returns an integer. This function is on Npgsql unit test suite, but I ...

Playing with Firefox 3.1beta2

Well, after a long time playing with nightly Webkit because Firefox wasn't so good on my mac, I decided to give it a try again with 3.1 beta2 and.... Wow! It's amazing! Super fast and I can even say that it seems faster than last webkit builds. I also liked that it seems to use a little less cpu than webkit which is very nice! Kudos to Mozilla Firefox people who is doing an excellent job regarding performance of firefox on OSX and from what I saw on other OS's too.

NpgsqlCommand optimizations and usage tip

Hi, all! Some days ago, I fixed a slow performance problem with Npgsql when calling functions . The problem was that Npgsql was doing a lot of expensive checks (in fact, 3) to verify parameter information and return type. The solution was to cache those checks so that new calls to the same function don't need to pass through the same checks again. In order to not have problems with outdated caches and etc and after talking to Josh on gmail, I decided to make the cache local and it would be invalidated as soon as the command text is changed. This semantics lead me to write this blog to share the idea that you can get a big performance improvement if you "cache" your NpgsqlCommands which will be used with function calls. This way, instead of creating and releasing the command object after its usage, you can create all your NpgsqlCommand objects associated to function calls and reuse them as needed. This way you pay for the costly checks only once. I hope this tip can help ...

Update: Two complains: Screen Responsiveness and SuspendToRam/Disk

Hi all! You may have seen I had two main complains about gnu/linux desktop. Today I updated my ubuntu with some long standing pending updates. I could see there was updates for firefox 3.0 and ati binary drivers. Well, I can see that now firefox responsiveness is much, much better. It is not so good as I'd like it to be, but it is in the right direction for sure!. I also see that desktop has a better screen responsiveness than before. That's great! I hope things get better and better as I want to see gnu/desktop as the best user experience possible. Thanks all who are working on those issues and fixing them.

Two complains: Screen Responsiveness and SuspendToRam/Disk

Hi all! Firstly, I'd like to say that I love Gnu/Linux and please don't take me wrong. What I'm saying here is based on what I see after using Gnu/Linux for the last 4 years. About the suspend to ram/disk I understand because it may be very difficult to have it working on all type of hardware. But as it was already pointed out on Ubuntu Brainstorm and I think they are already working on it. But now, at least to me, the biggest complain I have is the performance of screen responsiveness of gnu/linux desktop. I don't know if this is the correct term, but what I mean is the speed the text is draw in the screen, the speed the windows are rendered and so on. In summary, the perception I have of how fast the screen is drawing its contents. My experience is based on my old notebook. A Pentium4m with an intel 855gm with shared video memory. I'm using Ubuntu 8.04 with Gnome. When I open firefox on my gmail page, for example, the scroll is not so good. The scroll is too slow...