I found that on real RSS feeds with hundreds of podcast episodes, the
Soundcloud regular expressions would take, literally, half an hour to run.

The problem is this, on lines 41 and 42 of playlist/soundcloud.lua:
>   qargs.thumb_url = p:match('.+content="(.-)"%s+property="og:image"') or ''
>   qargs.title = p:match('.+content="(.-)"%s+property="og:title"') or ''

The following is my fixed version:
>   qargs.thumb_url = p:match('content="(.-)"%s+property="og:image"') or ''
>   qargs.title = p:match('content="(.-)"%s+property="og:title"') or ''

As you can see, the difference is the ".+" at the beginning of the
regex. That ".+" does something evil to cause backtracking and
exponential slowdown. And I do not believe it is needed or used for
anything.
-- 
                Knowledge is Power -- Power Corrupts
                        Study Hard -- Be Evil

------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
quvi-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/quvi-devel

Reply via email to