Monday, December 12, 2005

Performance: One line change

Hi all,

On this sunday, while playing on improving Npgsql performance and reviewing Ralph Mason's contributed code and Hubert Fongarnand bug report, I did a small modification which increased performance significantly.

Nunit test case which used to run in a little bit more than 5, 6 seconds, turned out to run in about 2.3 seconds!! :)

Also, Prepared statements performance was vastly improved.

The modification? Just changed the following line in NpgsqlClosedState.cs:

context.Stream = stream;
context.Stream = new BufferedStream(stream);

Yeah, just a buffered stream usage :)

I'm doing some more changes as well as integrating the aforementioned patches and improvements. This modification will be the first to hit cvs today.

Update: Well, the truth is that it wasn't a single line change :( I reviewed the code later and checked that performance improvement was also because of less calls to Stream.Flush() methods. These too much calls were destroying the gain obtained from BufferedStream.


dedicated hosting server web said...

Start Making Money Today.. Why wait

I would like to tell everyone I know about a new web site for dedicated hosting server web... If you are looking on ways to mkae money starting a business and need a site to host it on . Visit Today

online pharmacy said...

aldactone birth control pill
buy aldactone
aldactone acne
buy aldactone online
aldactone hair loss
aldactone online
25mg aldactone tab
aldactone drug
discount aldactone
aldactone for acne
purchase aldactone
mail order aldactone
online pharmacy aldactone
online pharmacy for aldactone
branded aldactone
buy aldactone and overseas
pharmacy aldactone
cheapest place to buy aldactone online
blood pressure aldactone
aldactone canada
prescription aldactone price
buy aldactone on the net
cheap aldactone
order aldactone online
aldactone medication
generic aldactone
buy prescription aldactone online
buy aldactone cheap
medication aldactone

Anonymous said...

wow gold | world of warcraft gold | wow power leveling | Cheap WoW Gold | Cheapest WoW Gold | Buy Cheap WoW Gold | cheapest wow gold | Buy WoW Gold | sell wow gold | WoW Accounts | wow accounts for sale | Buy WoW Power Leveling | Wow Honor Leveling | WoW profession leveling | WoW Reputation Leveling | WoW CD Key | WOW EU Gold | Cheap WoW Gold | wow gold for sale | Cheap WoW Power Leveling | WoW EU Accounts | world of warcraft accounts for sale | WoW EU CD Key | Lineage 2 Adena | Buy L2 Adena | Lineage 2 Adena for sale | Lineage 2 Accounts | Lineage 2 Power Leveling | Lineage 2 CD Key | Warhammer gold | Buy Warhammer Gold | Warhammer US Gold | Warhammer Power leveling | Warhammer CD Key | Warhammer Accounts | Warhammer EU Gold | Buy Cheap Warhammer Gold | WAR EU Gold | Buy Warhammer Power Leveling | Warhammer Online Accounts | Warhammer EU CD key | Aion gold | fast delivery Aion Gold | Aion Accounts | Aion Power Leveling | Aion CD Key | runes of magic gold | cheap runes of magic gold | runes of magic accounts | runes of magic power leveling | runes of magic cd key | runes of magic online gold | buy runes of magic eu gold | wow cheats | rom power leveling | runes of magic eu accounts for sale | cheap runes of magic cd key | FFXI Gil | Cheap FFXI Gil | Final Fantasy XI Gil | FFXI Power Leveling | FFXI CD Key | LoTRO Gold | Cheap Lotro Gold | LoTRO US Gold | LoTRO Accounts | Lotro accounts for sale | LoTRO Power Leveling | LoTRO CD Key | LoTRO EU Gold | Lord of the Rings Gold | LoTRO EU Accounts | Lotro Leveling | Lord of the Rings CD Key | Age of Conan gold | AoC US Gold | Cheap AoC Gold | Age of Conan Accounts | Age of Conan Power Leveling | Age of Conan Crafting Leveling | Age of Conan CD Key | Age of Conan EU Gold | Age of Conan Gold For Sale | Age of Conan Leveling | Age of Conan Accounts For Sale | AoC CD Key | The Chronicles of Spellborn Gold | Chronicles of Spellborn Gold | Chronicles of Spellborn Accounts | Chronicles of Spellborn Power Leveling | Chronicles of Spellborn CD key | atlantica gold | buy atlantica gold | atlantica power leveling | atlantica cd key | darkfall gold | buy darkfall gold | darkfall accounts | darkfall power leveling | darkfall cd key | silkroad gold | silkroad online gold | cheap silkroad gold | silkroad power leveling | Maple Story Mesos | Buy Maplestory Mesos | Maple Story Power Leveling | EVE ISK | EVE Online ISK | Cheap EVE ISK | EVE Power Leveling | EVE CD Key | EverQuest 2 Platinum | EverQuest 2 Gold | EQ2 Gold | EverQuest 2 Accounts | EverQuest 2 Power Leveling | EverQuest 2 CD Key