Commit Graph

58 Commits

Author SHA1 Message Date
Mike Bayer a6b62cc3fe Python-tidy test/engine and test/aaa_profiling, 80% auto + 20% manual intervention 2010-07-11 13:15:51 -04:00
Mike Bayer 7e72edc9d3 - updated obsolete docs regarding sequences, RETURNING for pg
- 78 chars for postgresql/base.py, engine/default.py
2010-07-06 17:39:20 -04:00
Mike Bayer 43dbfccf4d up the variance on these as the call counts are very low and
things wiggle around even between 2.6.4/2.6.5
2010-07-06 17:09:42 -04:00
Mike Bayer a9f2ed7b46 - latest distribute
- added caveats to unittest README encountered with Py2.7 + current nose 0.11.3
- call counts for py2.7.   all tests pass for sqlite + mysql-python + psycopg2
2010-07-05 19:54:46 -04:00
Mike Bayer c5ed8dfd8d version_info is the tuple 2010-06-15 14:05:02 -04:00
Mike Bayer 1769b2d8de - hypothesize that newer pysqlites are also growing a warning log on non-unicdoe strings 2010-06-14 20:15:27 -04:00
Mike Bayer 03e0f776be - The warning emitted by the Unicode and String types
with convert_unicode=True no longer embeds the actual
value passed.   This so that the Python warning
registry does not continue to grow in size, the warning
is emitted once as per the warning filter settings,
and large string values don't pollute the output.
[ticket:1822]
2010-06-13 16:09:13 -04:00
Mike Bayer 464f295854 fix this test for oracle 2010-05-31 14:46:21 -04:00
Mike Bayer cfe9fadc61 change the weakkeydict to be just an LRU cache. Add tests
for the "many combinations of UPDATE keys" issue.
2010-05-31 11:56:08 -04:00
Mike Bayer 9bab63b693 - Pool classes will reuse the same "pool_logging_name" setting
after a dispose() occurs.

- Engine gains an "execution_options" argument and
update_execution_options() method, which will apply to
all connections generated by this engine.

- Added more aggressive caching to the mapper's usage of
UPDATE, INSERT, and DELETE expressions.  Assuming the
statement has no per-object SQL expressions attached,
the expression objects are cached by the mapper after
the first create, and their compiled form is stored
persistently in a cache dictionary for the duration of
the related Engine.

- change #3 required change #1 so that we could test
a set of mappers operating over the course of many engines without
memory usage increase.
2010-05-30 20:24:08 -04:00
Mike Bayer ab62d418b2 guessed too soon on that 2010-04-16 14:31:36 -04:00
Mike Bayer 490a01c097 since we are calling traverse_single within ddl.py, call traverse_single at the entrypoint as well so that ddl.py
completely controls traversal
2010-04-16 13:48:45 -04:00
Mike Bayer cf65d1e42e check_reverse was failing a not well covered m2m case. 2010-04-10 20:13:51 -04:00
Mike Bayer 5df7420140 zoomark has additional callcount drops on this side 2010-04-07 14:28:33 -04:00
Mike Bayer e9d01db09b holy callcount batman 2010-04-07 14:23:06 -04:00
Mike Bayer fcf3536d1d add some callcounts with cextensions, [ticket:1723] 2010-03-26 12:47:01 -04:00
Mike Bayer 065fcbd9d2 - The official name for the relation() function is now
relationship(), to eliminate confusion over the relational
algebra term.  relation() however will remain available
in equal capacity for the foreseeable future.  [ticket:1740]
2010-03-17 17:48:29 -04:00
Mike Bayer 5dcc32fd5a - The visit_pool() method of Dialect is removed, and replaced with
on_connect().  This method returns a callable which receives
the raw DBAPI connection after each one is created.   The callable
is assembled into a first_connect/connect pool listener by the
connection strategy if non-None.   Provides a simpler interface
for dialects.
2010-03-15 13:08:31 -04:00
Mike Bayer f20138e2f9 callcount... 2010-03-13 14:54:41 -05:00
Mike Bayer 1f27092a45 move the initial connect out of the profile zone so we don't get a method call hit on that 2010-03-12 19:57:06 -05:00
Mike Bayer 969c04860f almost there, some tests failing still. 2010-03-09 13:41:43 -05:00
Mike Bayer 8c17344d1e preload type affinity entries so that these comparisons don't get shoved into the callcounts 2010-03-01 17:47:58 +00:00
Mike Bayer fbe6772d44 more bumps 2010-03-01 00:25:50 +00:00
Mike Bayer d840042748 some 2.4 bumps probably due to the tuple/list thing 2010-03-01 00:25:02 +00:00
Mike Bayer 6ec5b489c6 callcounts 2010-02-28 20:46:06 +00:00
Mike Bayer ba015e62cc - orm: Removed a lot of logging that nobody really cares about,
logging that remains will respond to live changes in the
log level.  No significant overhead is added.  [ticket:1719]
- engine: Opened up logging a bit such that isEnabledFor() is called
more often, so that changes to the log level for engine/pool
will be reflected on next connect.   This adds a small
amount of method call overhead.  It's negligible and will make
life a lot easier for all those situations when logging
just happens to be configured after create_engine() is called.
[ticket:1719]
2010-02-28 17:43:10 +00:00
Mike Bayer f0d1a04271 - typos
- type classes have a lot of detail in their constructors
2010-02-23 20:15:34 +00:00
Mike Bayer 05d5fc11d9 - Added "unicode_errors" parameter to String, Unicode, etc.
Behaves like the 'errors' keyword argument to
the standard library's string.decode() functions.   This flag
requires that `convert_unicode` is set to `"force"` - otherwise,
SQLAlchemy is not guaranteed to handle the task of unicode
conversion.   Note that this flag adds significant performance
overhead to row-fetching operations for backends that already
return unicode objects natively (which most DBAPIs do).  This
flag should only be used as an absolute last resort for reading
strings from a column with varied or corrupted encodings,
which only applies to databases that accept invalid encodings
in the first place (i.e. MySQL. *not* PG, Sqlite, etc.)
2010-02-23 19:53:07 +00:00
Mike Bayer 20d6baa09f more py3k fixes 2010-02-20 23:02:08 +00:00
Mike Bayer 874bd42726 callcounts 2010-02-16 23:42:06 +00:00
Mike Bayer ebe7f7b15e - A change to the solution for [ticket:1579] - an end-user
defined bind parameter name that directly conflicts with
a column-named bind generated directly from the SET or
VALUES clause of an update/insert generates a compile error.
This reduces call counts and eliminates some cases where
undesirable name conflicts could still occur.
2010-02-16 19:47:54 +00:00
Mike Bayer 739b7b0c25 some more 2.4 test fixes 2010-02-15 22:37:37 +00:00
Mike Bayer 23735fd8e1 2.6.4 has higher numbers for some reason here 2010-02-15 21:33:08 +00:00
Mike Bayer e0215c12d7 2.4 fix 2010-02-15 19:17:09 +00:00
Mike Bayer 7eeb1412d3 exclude this test for everyone but sqlite 2010-02-15 19:09:21 +00:00
Mike Bayer 563972b0ff update call counts 2010-02-15 18:59:21 +00:00
Mike Bayer b5c4bf2e4c more cleanup 2010-02-15 00:26:04 +00:00
Gaëtan de Menten 165609a190 - Added an optional C extension to speed up the sql layer by
reimplementing the highest impact functions.
  The actual speedups will depend heavily on your DBAPI and
  the mix of datatypes used in your tables, and can vary from
  a 50% improvement to more than 200%. It also provides a modest
  (~20%) indirect improvement to ORM speed for large queries.
  Note that it is *not* built/installed by default.
  See README for installation instructions.

- The most common result processors conversion function were
  moved to the new "processors" module.  Dialect authors are
  encouraged to use those functions whenever they correspond
  to their needs instead of implementing custom ones.
2010-02-13 22:53:39 +00:00
Jason Kirtland e38b11928a Fixed bug in session.merge() blocking dict-like collections from merging. 2010-02-11 00:43:34 +00:00
Mike Bayer abccc06242 - added "statement_options()" to Query, to so options can be
passed to the resulting statement. Currently only
Select-statements have these options, and the only option
used is "stream_results", and the only dialect which knows
"stream_results" is psycopg2.
- Query.yield_per() will set the "stream_results" statement
option automatically.
- Added "statement_options()" to Selects, which set statement
specific options. These enable e.g. dialect specific options
such as whether to enable using server side cursors, etc.
- The psycopg2 now respects the statement option
"stream_results". This option overrides the connection setting
"server_side_cursors". If true, server side cursors will be
used for the statement. If false, they will not be used, even
if "server_side_cursors" is true on the
connection. [ticket:1619]
- added a "frozendict" from http://code.activestate.com/recipes/414283/,
adding more default collections as immutable class vars on
Query, Insert, Select
2010-01-16 22:44:04 +00:00
Mike Bayer f4b143685c - cut down on a few hundred method calls 2010-01-11 03:16:10 +00:00
Mike Bayer b729503a3e - merge() will not issue a needless merge of attributes if the
given instance is the same instance which is already present.

- merge() now also merges the "options" associated with a given
state, i.e. those passed through query.options() which follow
along with an instance, such as options to eagerly- or
lazyily- load various attributes.   This is essential for
the construction of highly integrated caching schemes.  This
is a subtle behavioral change vs. 0.5.

- A bug was fixed regarding the serialization of the "loader
path" present on an instance's state, which is also necessary
when combining the usage of merge() with serialized state
and associated options that should be preserved.

- The "query_cache" examples have been removed, and are replaced
with a fully comprehensive approach that combines the usage of
Beaker with SQLAlchemy.  New query options are used to indicate
the caching characteristics of a particular Query, which
can also be invoked deep within an object graph when lazily
loading related objects.  See /examples/beaker_caching/README.
2010-01-10 21:21:45 +00:00
Mike Bayer ed6cbe607c - Session.merge() is performance optimized, using half the
call counts for "load=False" mode compared to 0.5 and
significantly fewer SQL queries in the case of collections
for "load=True" mode.
2010-01-07 22:09:17 +00:00
Mike Bayer aa6f068a92 - merge sqlite 2.5 memory exception from r6567 of 0.5 branch 2009-12-25 16:50:49 +00:00
Mike Bayer 8f4373104f supports unicode binds in PG too. even without the UNICODE extension it seems to work now... 2009-11-06 02:39:16 +00:00
Mike Bayer bc714d614d test fixes 2009-10-26 01:29:56 +00:00
Mike Bayer 5119ce78b5 - The psycopg2 dialect now uses psycopg2's "unicode extension"
on all new connections, which allows all String/Text/etc.
types to skip the need to post-process bytestrings into
unicode (an expensive step due to its volume).  Other
dialects which return unicode natively (pg8000, zxjdbc)
also skip unicode post-processing.

- String/Text/Unicode types now skip the unicode() check
on each result column value if the dialect has
detected the DBAPI as returning Python unicode objects
natively.  This check is issued on first connect
using "SELECT CAST 'some text' AS VARCHAR(10)" or
equivalent, then checking if the returned object
is a Python unicode.   This allows vast performance
increases for native-unicode DBAPIs, including
pysqlite/sqlite3, psycopg2, and pg8000.
2009-10-26 00:32:39 +00:00
Mike Bayer fafbe57b30 fix some 2.4 callcounts 2009-10-24 20:36:44 +00:00
Mike Bayer 52b1ace676 - ResultProxy internals have been overhauled to greatly reduce
method call counts when fetching columns that have no
type-level processing applied.   Provides a 100% speed
improvement when fetching large result sets with no unicode
conversion.  Many thanks to Elixir's Gaëtan de Menten
for this dramatic improvement !  [ticket:1586]
2009-10-24 16:38:07 +00:00
Mike Bayer 2e8b1639f8 update counts for 2.4 2009-10-23 21:30:02 +00:00