Skip to content

Performance improvement - #2

Closed
zapov wants to merge 40 commits into
npgsql:masterfrom
zapov:master
Closed

zapov wants to merge 40 commits into
npgsql:masterfrom
zapov:master

Conversation

@zapov

@zapov zapov commented Feb 19, 2012

Copy link
Copy Markdown

Created lookup array for byte indexes.
Byte array populated from that lookup.

@zapov

zapov commented Jul 17, 2012

Copy link
Copy Markdown
Author

Oh, well

@zapov zapov closed this Jul 17, 2012
franciscojunior and others added 8 commits July 18, 2012 00:02
Changes:

2012-01-12 16:44  fxjr

	* src/: Npgsql/Cache.cs, Npgsql/NpgsqlCommand.cs,
	  Npgsql/NpgsqlCommandBuilder.cs, Npgsql/NpgsqlConnector.cs,
	  Npgsql/NpgsqlConnectorPool.cs, Npgsql/NpgsqlState.cs,
	  Npgsql/PGUtil.cs, NpgsqlTypes/BitString.cs:
	  Applied Gildas Prime patch with Gendarme report corrections:

	  Avoid concatenating chars rule ( i.e Unneeded boxing) A recursive
	  method was found (Method remove in NpgsqlParameterCollection)
	  Disposable fields should be disposed Do not lock on this  (
	  lock(this) makes very difficult to ensure that the locking is
	  done correctly.) Ensure that local variables are disposed
	  surrounding them by using()

2012-01-10 01:14  fxjr

	* src/Npgsql/NpgsqlConnectorPool.cs:
	  Fixed tabulation.

2012-01-09 12:48  fxjr

	* src/Npgsql/NpgsqlConnectorPool.cs:
	  Fix [#1011138] Connection pooling performance suffers under heavy
	  load.  Rewritten connector pool logic in order to keep lock for
	  much less time and also with a higher granularity.  Thanks Andrew
	  for heads up.
…ERIALIZABLE. Thanks Randy Ficker for heads up and patch.

Npgsql wasn't honoring the repeatable read isolation level request. This used to work until 9.1 version.
	* src/Npgsql/SqlGenerators/: SqlBaseGenerator.cs,
	  VisitedExpression.cs: Fix Include combined with Skip and/or Take
	  using linq to entities for bug #1011208

2012-06-06 11:25  fxjr

	* src/Npgsql/NpgsqlClosedState.cs:
	  [#1011200] Uses API not supported in MonoTouch. Also fixes
	  https://bugzilla.xamarin.com/show_bug.cgi?id=4992 Npgsql2.0.11 Is
	  not working on MonoTouch. Thanks Sebastien for heads up and all
	  others for helping with this issue.

2012-03-23 09:45  fxjr

	* src/Npgsql/NpgsqlCommand.cs:
	  [#1011161] Bug in NpgsqlCommand while getting readers from
	  refcursors. Thanks Rabin Karki for heads up and patch.

2012-03-11 22:59  fxjr

	* src/Npgsql/NpgsqlTransaction.cs:
	  [#1011174] Requesting the REPEATABLE READ isolation level gives
	  you SERIALIZABLE.  Thanks Randy Ficker for heads up and patch.

	  Npgsql wasn't honoring the repeatable read isolation level
	  request. This used to work until 9.1 version.
Detect broken connection on Postgres sync notification.
Change connetion state to enable recovery.
Fixing chaos in code.
Tabs and spaces.
Meaningfull folders.
Grouping functionality.
Since Nullable<> are not listed in type mappings, check for container type.
@franciscojunior

Copy link
Copy Markdown
Member

Hi! Sorry, I didn't check your pull request yet. I'll check it and will let you know if I have any comments. Thank you for your support!

Removed unnecessary string to StringBuilder conversion.
For long strings use GetByteCount to evade OutOfMemoryException
new NpgsqlConnection(string) is slow.
Redirect clone to new private constructor which uses NpgsqlConnectionStringBuilder instead of string.
Since DbConnectionStringBuilder Clear is slow too, reuse NpgsqlConnectionStringBuilder.
NpgsqlConnectionStringBuilder can change in ChangeDatabase, so Clone it there.

Optimized LogConnectionString()
Skip looping if logging is disabled.
Manage memory to avoid fragmentation.
Error handling for 9.3
Open, Closed events
zapov added 7 commits August 15, 2013 10:09
Added Stream constructor to command for large commands.
There are some strange rules for UTF conversion and let's not reproduce them.
Allow for :: conversion to actual type
Single initialization query.
Moved if out of loop.
Swallow unknown error.

TODO: fix IsValid logic. This takes most of the time in stressed applications.
State should not throw exception. If connection is disposed return Closed state.

Update of Mono.Security since previous one doesn't work on Mono
Thread.Sleep(0) doesn't quite work on Linux.
String was incorrectly escaped for \ as \\.
This requires E prefix which is not used.
Hack to fix conversion, parameter is still wrong.
@roji
roji force-pushed the master branch 2 times, most recently from 0b35ef0 to c43b6af Compare September 16, 2014 08:50
roji added a commit that referenced this pull request Oct 27, 2014
@roji
roji force-pushed the master branch 2 times, most recently from e1d8c57 to 1f140e5 Compare January 14, 2015 02:37
@roji
roji force-pushed the master branch 2 times, most recently from 1236d1f to e8ae2e0 Compare April 12, 2015 07:50
@roji
roji force-pushed the master branch 5 times, most recently from 2fc8944 to 3eb6fa4 Compare April 29, 2015 14:47
@roji roji closed this Aug 7, 2015
roji added a commit that referenced this pull request Aug 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants