On Nov 30, 2007 7:03 PM, Edward Z. Yang <[EMAIL PROTECTED]> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Richard Quadling wrote:
> > If, at the least, the files was a simple $a_Array, which could be
> > written using ...
> >
> > file_put_contents('./index.cache', ,'<?php $a_Index = ' .
> > var_export($a_Index, True) . '; ?>');
> >
> > sort of thing, then you could just include it and the index would be
> > available instantly. No need for file io parsing.
>
> That's an interesting technique. However, PHP's source code parser is
> quite a bit more complicated than what our index format needs, so it's
> quite possible that the fact that our custom format's simplicity would
> offset PHP's performance gains from being written in C (I suppose we'd
> have to benchmark to find out, but I remember MediaWiki's developers
> talking about this).
>
> The other implementation difficulty is getting the references to point
> to the right locations in var_export, which is probably impossible,
> which means we have to make a copy of $IDs in order to process in order
> a non-referenced structure (alternatively, reversibly de-reference and
> reference the children's entries).

The indexer is stupid, poorly written and needs to index much more
than it currently does.
Working from the assumption mktoc.php is cool and sufficient is wrong :)

-Hannes

Reply via email to