Wikipedia:維基百科工具/導航Popup/關於修正重定向
维基百科,自由的百科全书
Some users of Popups are making inappropriate use of the popupFixRedirs feature. They think their use of the feature is reducing work for the Wikipedia servers, but in fact, they're increasing the work the Wikipedia servers have to do.
Say you come across a perfectly legitimate redirect link, for instance (morphosyntax redirects to Morphology (linguistics)):
Wikitext | Display |
---|---|
Some languages treat unergative verbs distinctly from other intransitives in [[morphosyntax|morphosyntactical]] terms. | Some languages treat unergative verbs distinctly from other intransitives in morphosyntactical terms. |
The popupFixRedirs feature allows you to hover over the morphosyntactical link, click Redirects, and change the text to:
Wikitext | Display |
---|---|
Some languages treat unergative verbs distinctly from other intransitives in [[Morphology (linguistics)|morphosyntactical]] terms. | Some languages treat unergative verbs distinctly from other intransitives in morphosyntactical terms. |
(Note: Please don't try it on this page. Popups fixes every case of a redirect where it finds it on a page, and so this text will make no sense if you fix it.)
The new wikitext avoids the redirect and goes straight to the right page, so it must be better on the Wikipedia servers, and you're performing a great service by fixing the bad link, right? Unfortunately, probably not.
Here's why:
- When someone clicks on a redirected link (say, morphosyntax), the MediaWiki software performs SQL queries to locate the destination page. That query includes a check as to whether the requested destination is a redirect (every page includes a database field called page.page_is_redirect), and if so, it returns the location of the redirected page. In other words, while it's technically true that it's more expensive to follow a redirect than a direct link, it's only the tiniest hair more expensive. (For those who care, the actual number on a recent version of MediaWiki was 44 SELECT statements to follow a direct link versus 48 to follow a redirect.)
- When you use Popups to fix a redirect, MediaWiki has to do more SQL queries than it takes to follow the redirect, but it also has to do several database transactions and writes. (To be exact, 8 transactions with 64 SELECTs, 10 UPDATEs, 4 INSERTs, and 2 DELETEs, on that same version of MediaWiki.)
- Database updates — that is, write operations — are many orders of magnitude more expensive on the servers than database queries — that is, read operations. A recent benchmark showed that fixing a redirect is approximately ten thousand times more expensive for the server than following that redirect.
In other words, readers of Wikipedia would have to use a redirect link about 10,000 times before it would be worthwhile to replace that link with a direct link.
If you're editing a page anyway, go ahead and fix redirects if you so desire. But editing a page expressly for the purpose of fixing a redirect is unnecessary. Using Popups to fix a redirect is almost never necessary.
There is a final, perhaps more important, reason not to fix many redirects: The redirect page might be about another but related topic from the one redirected to, and someone might want to create the page in the future; such a page is a redirect with possibilities. When such a page is created, "fixed" redirects will point to an incorrect (or less precise) page.