Go to the FreeLists Home Page Home Signup Help Login
 



[dokuwiki] || [Date Prev] [02-2007 Date Index] [Date Next] || [Thread Prev] [02-2007 Thread Index] [Thread Next]

[dokuwiki] Re: snapshot errors?

  • From: Chris Smith <chris@xxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Tue, 06 Feb 2007 21:22:33 +0000
Andreas Gohr wrote:
On Tue, 06 Feb 2007 17:32:55 +0000
Chris Smith <chris@xxxxxxxxxxxxx> wrote:

Todd Augsburger wrote:
Just installed the 2007-02-06 snapshot and get these errors on many
of the pages:

Warning: preg_match() [function.preg-match]: Compilation failed:
regular expression too large at offset 0 in
[...] /inc/parser/lexer.php on line 115

Anybody else getting this, or is it just me? Pages with a large
quantity of links seem go give this error, but other pages seem
slow too.
see fs#1067 at bugs.splitbrain.org

Chris, did you have a look at the proposed patch, yet? I understand
what the patch does, but I'm not quite sure why the parser is called
this much suddenly. Is this related to the recent metadata changes with
for FS#1010?

Andi

I haven't looked at the proposed patch. Re, FS#1010. Yes and no. Its related to the change that #1010 fixed. Before that fix there would be no attempt to parse metadata if it didn't exist. Ben's patch started parsing metadata for firstheadings when metadata didn't exist. My patch continues with that, but removes the possibility of looping.

I expect the underlying problem existed before, but the most number of calls to the parser was probably something like three or four (sidebar with sidebar template, edit page localised text, preview for edit page, metadata for edited page) and even that was unlikely to be reached as sidebar and localised text are most likely supplied from cache.

I took a look at the code in the parser, as I understand it, the bug says second and subsequent instantiations of the parser use existing patterns for acronyms, smileys, wordblock, etc, but don't recognise that they are already built and go through the same pattern building as before ... but adding to the existing pattern. So we need to either:
- add code to realise the pattern already exists (the patch provide)
- add code further upstream to avoid further pattern building once its already complete.

The second alternative should be the best. I guess we make the final pattern static and reuse it if its there.

Cheers,

Chris

--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist




[ Home | Signup | Help | Login | Archives | Lists ]

All trademarks and copyrights within the FreeLists archives are owned by their respective owners.
Everything else ©2007 Avenir Technologies, LLC.