User "Werdna" posted a comment on MediaWiki.r79520. Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/79520#c19746 Commit summary:
Try to output editsection markers instead of rendered editsection links and defer the rendering to a point where the markup does not need to be stored in the cache. Doing this allows skins to override doEditSectionLinks without poluting the parser cache or fragmenting the parser cache more. As a side effect it eliminates the primary cause of user language based parser cache fragmentation. Because this makes most old parser cache entries invalid $wgUseEditSectionTokens is provided so that large installations like Wikipedia can keep their old parser cache entries. Comment: I've done something similar to this before, for embedding dynamic LiquidThreads pages into other pages with wiki markup. Given how that went for me, I'd recommend the following: * Use an HTML comment with a prefix and a random hexadecimal string instead of parser strip markers. This won't be touched by the language converter. * Generate the section edit links at parse time instead of at replace time, and store them in the Parser Output as a straight associative array of string to string replacements. Then, in OutputPage::addHTML or thereabouts, figure out whether you're going to show them or not, and either do the replacement or strip them out. * There's no need to purge the parser cache en-masse. I'm not quite sure how you'd factor it, but if the appropriate entry is available in the parser cache with section edit links substituted in, then in theory there's no need to regenerate the parser output with them optional if the user wants section edit links. _______________________________________________ MediaWiki-CodeReview mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview
