Created
July 28, 2012 00:32
-
-
Save allenluce-zz/3191201 to your computer and use it in GitHub Desktop.
Commit 3c24d247
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit 3c24d247ec2fc421cfdf05f53314284634307542 | |
Author: Alex May <alex.k.may@gmail.com> | |
Date: Sun Apr 15 13:02:00 2012 -0700 | |
set sane limits on stack size | |
- we know that stacks of size 10k+ cannot be iterated through | |
quickly enough to serve web requests | |
diff --git a/src/opencore/opencore/models/contentfeeds.py b/src/opencore/opencore/models/contentfeeds.py | |
index 4a71ee3..589ae5c 100644 | |
--- a/src/opencore/opencore/models/contentfeeds.py | |
+++ b/src/opencore/opencore/models/contentfeeds.py | |
@@ -56,8 +56,8 @@ log = logging.getLogger(__name__) | |
class SiteEvents(Persistent): | |
implements(ISiteEvents) | |
- def __init__(self): | |
- self._stack = AppendStack(max_layers=360, max_length=1000) | |
+ def __init__(self, max_layers=10, max_length=100): | |
+ self._stack = AppendStack(max_layers=max_layers, max_length=max_length) | |
def __iter__(self): | |
""" See ISiteEvents. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment