From 05e8f8a91906846f85ad49ca788e74c5377ea471 Mon Sep 17 00:00:00 2001 From: Jason Kirtland Date: Tue, 21 Aug 2007 16:58:49 +0000 Subject: Inlined ClauseParameters.set_parameter (simple assignment) in construct_params Big drop in function count for inserts (22%) with about a 3% wall clock improvement. --- lib/sqlalchemy/sql/compiler.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/sqlalchemy/sql/compiler.py') diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index 9e8173eef..6aab22a79 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -229,8 +229,9 @@ class DefaultCompiler(engine.Compiled, visitors.ClauseVisitor): bind_names = self.bind_names for key, bind in self.binds.iteritems(): - d.set_parameter(bind, pd.get(key, bind.value), bind_names[bind]) - + # the following is an inlined ClauseParameters.set_parameter() + name = bind_names[bind] + d._binds[name] = [bind, name, pd.get(key, bind.value)] return d params = property(lambda self:self.construct_params(), doc="""Return the `ClauseParameters` corresponding to this compiled object. -- cgit v1.2.1