Hello mediawiki world
I'm still trying to fix the refreshLinks, to have a reasonnable speed :)
It seems that when calling the parser we also call the render and so in maintenance we render in html ALL the pages , just for checking the links.
We only need to read once the text, extract WIKIMARKS and put that in the right link table, but NOT render the html.
The parser (should be renamed parse&render ?) is very complicated to understand, so i need help to find when the link stuff is done and skip all the html stuff.
Thanks Alain
On Dec 22, 2004, at 8:28 AM, Baeckeroot alain wrote:
The parser (should be renamed parse&render ?) is very complicated to understand, so i need help to find when the link stuff is done and skip all the html stuff.
The "parser" is the "renderer".
-- brion vibber (brion @ pobox.com)
Le Mercredi 22 Décembre 2004 23:02, Brion Vibber a écrit :
On Dec 22, 2004, at 8:28 AM, Baeckeroot alain wrote:
The parser (should be renamed parse&render ?) is very complicated to understand, so i need help to find when the link stuff is done and skip all the html stuff.
The "parser" is the "renderer".
-- brion vibber (brion @ pobox.com)
Thanks for that answer. At least i ve understood that :) It s a good beginning. Now i can go on more seriously :)
Alain
On Wed, 22 Dec 2004 17:28:14 +0100, Baeckeroot alain al2.baeckeroot@laposte.net wrote:
We only need to read once the text, extract WIKIMARKS and put that in the right link table, but NOT render the html.
The parser (should be renamed parse&render ?) is very complicated to understand, so i need help to find when the link stuff is done and skip all the html stuff.
Because the "parser" isn't a real structured parser, you can't really do just parts - the links are checked in Parser::replaceInternalLinks(), but before you get there, you've got to have done things like removing <nowiki></nowiki> sections, transcluding {{templates}}, and probably other things I haven't thought of. So the fact that it generates HTML while it's doing it is a relatively small price (and of course makes things *simpler* for 99% of cases where the "parser" is used), the big overhead is probably getting there in the first place...
[That said, if you can find a non-ugly way of doing it, you could perhaps avoid some particularly expensive steps - like rendering the HTML for image links, as long as you don't mess with the semi-recursive part of replaceInternalLinks() that deals with links inside captions.]
Le Jeudi 23 Décembre 2004 13:52, Rowan Collins a écrit :
On Wed, 22 Dec 2004 17:28:14 +0100, Baeckeroot alain al2.baeckeroot@laposte.net wrote:
We only need to read once the text, extract WIKIMARKS and put that in the right link table, but NOT render the html.
The parser (should be renamed parse&render ?) is very complicated to understand, so i need help to find when the link stuff is done and skip all the html stuff.
Because the "parser" isn't a real structured parser, you can't really do just parts - the links are checked in Parser::replaceInternalLinks(), but before you get there, you've got to have done things like removing <nowiki></nowiki> sections, transcluding {{templates}}, and probably other things I haven't thought of. So the fact that it generates HTML while it's doing it is a relatively small price (and of course makes things *simpler* for 99% of cases where the "parser" is used), the big overhead is probably getting there in the first place...
[That said, if you can find a non-ugly way of doing it, you could perhaps avoid some particularly expensive steps - like rendering the HTML for image links, as long as you don't mess with the semi-recursive part of replaceInternalLinks() that deals with links inside captions.]
-- Rowan Collins BSc
OK Thanks for the explainations. So i m on the good way. I thought i was lost in the code, but no. OK I understand that doing parse&render at the same time is an optimisation for 99% time , except maintenance :(
As i m beginning in php, I think the best i can do is just to extract a modified maintenance-parser-only.php I ll try after Xmas, maybe before new year ?
++ Alain
Le Jeudi 23 Décembre 2004 13:52, Rowan Collins a écrit :
On Wed, 22 Dec 2004 17:28:14 +0100, Baeckeroot alain al2.baeckeroot@laposte.net wrote:
We only need to read once the text, extract WIKIMARKS and put that in the right link table, but NOT render the html.
The parser (should be renamed parse&render ?) is very complicated to understand, so i need help to find when the link stuff is done and skip all the html stuff.
Because the "parser" isn't a real structured parser, you can't really do just parts - the links are checked in Parser::replaceInternalLinks(), but before you get there, you've got to have done things like removing <nowiki></nowiki> sections, transcluding {{templates}}, and probably other things I haven't thought of. So the fact that it generates HTML while it's doing it is a relatively small price (and of course makes things *simpler* for 99% of cases where the "parser" is used), the big overhead is probably getting there in the first place...
[That said, if you can find a non-ugly way of doing it, you could perhaps avoid some particularly expensive steps - like rendering the HTML for image links, as long as you don't mess with the semi-recursive part of replaceInternalLinks() that deals with links inside captions.]
-- Rowan Collins BSc [IMSoP] _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org