---------- Forwarded message ---------- From: rotem@svn.leuksman.com rotem@svn.leuksman.com Date: 20-Jun-2006 10:56 Subject: [MediaWiki-CVS] SVN: [14835] trunk/phase3/languages/Messages.php To: mediawiki-cvs@wikimedia.org
Fixes per Gangleri's request: * Replacing {{ns:X}} with the real namespace names, for performance - except for "administrators" which is directly shown. * Removing the obsolete underscores from the log pages.
I went through the messages files and replaced certain instances of {{ns:blah}} with canonical names a while ago, per Domas' request. This change is a little bit needless, since those messages aren't used in all page views, so the performance hit is reduced. What does happen is a less intuitive interface readout.
I did explain all this to Gangleri at the time.
Rob Church
Rob Church wrote:
---------- Forwarded message ---------- From: rotem@svn.leuksman.com rotem@svn.leuksman.com Date: 20-Jun-2006 10:56 Subject: [MediaWiki-CVS] SVN: [14835] trunk/phase3/languages/Messages.php To: mediawiki-cvs@wikimedia.org
Fixes per Gangleri's request:
- Replacing {{ns:X}} with the real namespace names, for performance -
except for "administrators" which is directly shown.
- Removing the obsolete underscores from the log pages.
Rob Church wrote:
Fixes per Gangleri's request:
- Replacing {{ns:X}} with the real namespace names, for performance -
except for "administrators" which is directly shown.
I went through the messages files and replaced certain instances of {{ns:blah}} with canonical names a while ago, per Domas' request. This change is a little bit needless, since those messages aren't used in all page views, so the performance hit is reduced. What does happen is a less intuitive interface readout.
Is this a significant performance issue? When editing the MediaWiki messages on enwiki, I've been habitually replacing [[X:Foo]] with [[{{ns:X}}:Foo]] to make it easier to copy the messages over to other projects with different namespace names. Should I only do this for {{ns:Project}}, on the assumption that the other namespaces will have the same names on most English projects? Or should I avoid using {{ns:}} entirely? Does it only matter for some messages?
On 20/06/06, Ilmari Karonen nospam@vyznev.net wrote:
Is this a significant performance issue? When editing the MediaWiki messages on enwiki, I've been habitually replacing [[X:Foo]] with [[{{ns:X}}:Foo]] to make it easier to copy the messages over to other projects with different namespace names. Should I only do this for {{ns:Project}}, on the assumption that the other namespaces will have the same names on most English projects? Or should I avoid using {{ns:}} entirely? Does it only matter for some messages?
As I understood from discussion with Domas, the problem was the double-brace substitution in messages used within the skins, that is; messages which are used on each page view. These go through the parser and impact performance.
Reducing these to using canonical namespace names helps, and doesn't harm the interface, since all those uses have corresponding "caption" messages.
With the odd message that is used often, but not on every view, e.g. "This page is protected, see [[{{ns:project}}:Protected page]] for help, it's not such a problem, and is in fact acceptable given that it improves the user experience. The messages I changed were redundantly using transformations.
Rob Church
As I understood from discussion with Domas, the problem was the double-brace substitution in messages used within the skins, that is; messages which are used on each page view. These go through the parser and impact performance.
Reducing these to using canonical namespace names helps, and doesn't harm the interface, since all those uses have corresponding "caption" messages.
I was surprised when Gangleri told me about it. {{ns: }} *should be* the preferred method. If you link to something/wiki/Project:Foo then whoever clicks on it will go under a redirection. People looking at the target of redirection on a chinese wiki won't expect an english word.
And if such perfomance is *so* important (they're all cached, aren't they?) {{ns: substitution on the skin could be directly at php level, without {{ parsing, with str_replace() calls, which should be much faster.Yeah, it'd break the 'in order parse' and force {{ns:}} substitution to be handled the first, but i don't think it can be so bad. We already have(had) worse things. I think it's worse to be hardcoding the {{ns: }} You can always script from {{ns:Foo}} to LangFoo: but you can't do it the other way round.
Platonides
Hi!
And if such perfomance is *so* important (they're all cached, aren't they?)
we cache parser cache. we do not know which interface messages depend on context and which do not, so we can't apply proper caching there. I added sitenotice cache exactly because of that, as I knew it's static across all pages.
{{ns: substitution on the skin could be directly at php level, without {{ parsing, with str_replace() calls, which should be much faster.Yeah, it'd break the 'in order parse' and force {{ns:}} substitution to be handled the first, but i don't think it can be so bad. We already have(had) worse things. I think it's worse to be hardcoding the {{ns: }} You can always script from {{ns:Foo}} to LangFoo: but you can't do it the other way round.
There's much more to {{ expansions. People add all sorts of stuff there. What I care is that messages which are shown at least in 5% page views, shouldn't be parsed. It is especially wrong with messages, that are parsed at 100% of page views.
Domas
Platonides wrote:
I was surprised when Gangleri told me about it. {{ns: }} *should be* the preferred method. If you link to something/wiki/Project:Foo then whoever clicks on it will go under a redirection. People looking at the target of redirection on a chinese wiki won't expect an english word.
[[Project:Foo|bar]] will always render with the link normalized (eg 'Wikipedia:Foo' or 'Википедија:Foo' or whatever, appropriately URL-encoded).
At the moment at least, [[Project:Foo]] will *show* 'Project:Foo', just as [[foo]] *shows* 'foo' but *links* to 'Foo'.
In general links in UI messages will be using descriptive link text; if they're not, they probably ought to be changed to a friendlier text form.
-- brion vibber (brion @ pobox.com)
wikitech-l@lists.wikimedia.org