diff options
| author | Jason Kirtland <jek@discorporate.us> | 2007-08-21 16:58:49 +0000 |
|---|---|---|
| committer | Jason Kirtland <jek@discorporate.us> | 2007-08-21 16:58:49 +0000 |
| commit | 05e8f8a91906846f85ad49ca788e74c5377ea471 (patch) | |
| tree | d717e992b756b390f962a13f41ce735d46df78e8 /lib/sqlalchemy/sql/compiler.py | |
| parent | 7f46c8b8d965672fc38c2221a95944e704d63448 (diff) | |
| download | sqlalchemy-05e8f8a91906846f85ad49ca788e74c5377ea471.tar.gz | |
Inlined ClauseParameters.set_parameter (simple assignment) in construct_params
Big drop in function count for inserts (22%) with about a 3% wall clock improvement.
Diffstat (limited to 'lib/sqlalchemy/sql/compiler.py')
| -rw-r--r-- | lib/sqlalchemy/sql/compiler.py | 5 |
1 files changed, 3 insertions, 2 deletions
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. |
