summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/mapper.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2017-09-07 20:38:00 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2017-09-07 20:39:48 -0400
commit60fec8d2f19d8134df06b9cc63c52aae27c9dcfe (patch)
treece212e6eaf0ec575240f6527c04e70e4cf756d78 /lib/sqlalchemy/orm/mapper.py
parent2e137b3954f57c0b2e1977419ccecda35b5265b2 (diff)
downloadsqlalchemy-ticket_4071.tar.gz
Remove LRU warningsticket_4071
Removed the warnings that are emitted when the LRU caches employed by the mapper as well as loader srtategies reach their threshold; the purpose of this warning was at first a guard against excess cache keys being generated but became basically a check on the "creating many engines" antipattern. While this is still an antipattern, the presense of test suites which both create an engine per test as well as raise on all warnings will be an inconvenience; it should not be critical that such test suites change their architecture just for this warning (though engine-per-test suite is always better). Change-Id: I41ef8cd642d05a845f53119b196440f9d7879cd9 Fixes: #4071
Diffstat (limited to 'lib/sqlalchemy/orm/mapper.py')
-rw-r--r--lib/sqlalchemy/orm/mapper.py15
1 files changed, 1 insertions, 14 deletions
diff --git a/lib/sqlalchemy/orm/mapper.py b/lib/sqlalchemy/orm/mapper.py
index 9b9457213..1d172f71a 100644
--- a/lib/sqlalchemy/orm/mapper.py
+++ b/lib/sqlalchemy/orm/mapper.py
@@ -2871,20 +2871,7 @@ class Mapper(InspectionAttr):
@_memoized_configured_property
def _compiled_cache(self):
- return util.LRUCache(self._compiled_cache_size,
- size_alert=self._alert_lru_cache_limit)
-
- def _alert_lru_cache_limit(self, lru_cache):
- util.warn(
- "Compiled statement cache for mapper %s is "
- "reaching its size threshold of %d, based on _compiled_cache_size "
- "of %d. Please refer to "
- "http://docs.sqlalchemy.org/en/latest/faq/performance.html"
- "#faq_compiled_cache_threshold"
- " for best practices." %
- (self,
- lru_cache.size_threshold,
- self._compiled_cache_size))
+ return util.LRUCache(self._compiled_cache_size)
@_memoized_configured_property
def _sorted_tables(self):