From 2be39d5342746ea08ec5f7dcb73b6177b004de54 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 26 May 2013 20:02:17 -0400 Subject: [PATCH] get profile 1a back down to 5100 calls, that one was 10% greater due to this --- lib/sqlalchemy/engine/base.py | 6 +++--- test/profiles.txt | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py index c2ba0922b2..2d9f3af94e 100644 --- a/lib/sqlalchemy/engine/base.py +++ b/lib/sqlalchemy/engine/base.py @@ -734,9 +734,9 @@ class Connection(Connectable): distilled_params = _distill_params(multiparams, params) if distilled_params: - # need list() + keys() here to suit - # both dict and RowProxy - keys = list(distilled_params[0].keys()) + # note this is usually dict but we support RowProxy + # as well; but dict.keys() as an iterator is OK + keys = distilled_params[0].keys() else: keys = [] diff --git a/test/profiles.txt b/test/profiles.txt index a41e153d93..090cf5ea1d 100644 --- a/test/profiles.txt +++ b/test/profiles.txt @@ -265,8 +265,7 @@ test.aaa_profiling.test_resultset.ResultSetTest.test_unicode 3.3_sqlite_pysqlite # TEST: test.aaa_profiling.test_zoomark.ZooMarkTest.test_profile_1a_populate -test.aaa_profiling.test_zoomark.ZooMarkTest.test_profile_1a_populate 2.7_postgresql_psycopg2_cextensions 5131 -test.aaa_profiling.test_zoomark.ZooMarkTest.test_profile_1a_populate 2.7_postgresql_psycopg2_nocextensions 5693 +test.aaa_profiling.test_zoomark.ZooMarkTest.test_profile_1a_populate 2.7_postgresql_psycopg2_nocextensions 5175 test.aaa_profiling.test_zoomark.ZooMarkTest.test_profile_1a_populate 3.2_postgresql_psycopg2_nocextensions 4828 test.aaa_profiling.test_zoomark.ZooMarkTest.test_profile_1a_populate 3.3_postgresql_psycopg2_nocextensions 4792 -- 2.47.3