[pypy-issue] [Bitbucket] Issue #1811: finditer() stalls PyPy 2.3.1 (pypy/pypy)
issues-reply at bitbucket.org
Sun Jul 6 14:21:08 CEST 2014
--- you can reply above this line ---
New issue 1811: finditer() stalls PyPy 2.3.1
I've come across a significant performance hit when using PyPy 2.3.1 with Bottle ([commit](https://github.com/defnull/bottle/blob/bc312ae49d9f7f389c06db53898e5a5f7b63c93c/bottle.py#L3429)) on Linux x86_64.
In the method below ([ref](https://github.com/defnull/bottle/blob/bc312ae49d9f7f389c06db53898e5a5f7b63c93c/bottle.py#L3429)), PyPy stalls when instantiating the generator for a good three seconds according to the timestamps of the log messages I inserted, whereas stock CPython just breezes through this.
text = ''.join(self.text_buffer)
if not text: return
parts, pos, nl = , 0, '\\\n'+' '*self.indent
for m in self.re_inl.finditer(text):
prefix, pos = text[pos:m.start()], m.end()
I suspect this is partly due to the complexity of the regexp, but it shouldn't happen. I've filed [an issue there](https://github.com/defnull/bottle/issues/638) with a `pstats` profile.
Unsubscribe from issue emails for this repository.
More information about the pypy-issue