]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Warn on _compiled_cache growth
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 12 Apr 2017 15:37:19 +0000 (11:37 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 12 Apr 2017 16:53:40 +0000 (12:53 -0400)
commitcef4e5ff38dc7d2200800837c110ab6beec10d8a
tree24eac58c1fb6e3105c9c4c7046d1aa2b5259a67d
parent1b463058e3282c73d0fb361f78e96ecaa23ce9f4
Warn on _compiled_cache growth

Added warnings to the LRU "compiled cache" used by the :class:`.Mapper`
(and ultimately will be for other ORM-based LRU caches) such that
when the cache starts hitting its size limits, the application will
emit a warning that this is a performance-degrading situation that
may require attention.   The LRU caches can reach their size limits
primarily if an application is making use of an unbounded number
of :class:`.Engine` objects, which is an antipattern.  Otherwise,
this may suggest an issue that should be brought to the SQLAlchemy
developer's attention.

Additionally, adjusted the test_memusage algorithm again as the
previous one could still allow a growing memory size to be missed.

Change-Id: I020d1ceafb7a08f6addfa990a1e7acd09f933240
doc/build/changelog/changelog_12.rst
doc/build/faq/performance.rst
lib/sqlalchemy/orm/mapper.py
lib/sqlalchemy/util/_collections.py
test/aaa_profiling/test_memusage.py
test/orm/test_mapper.py