Проект:Связность/Задача недели

Материал из Википедии — свободной энциклопедии
Перейти к навигации Перейти к поиску

Lists recognition[править код]

Golem recognizes lists of links by a category. Maintaining such a category could not be an easy task. In order to avoid this task, I'd like to order pages by link per text density.

The task looks pretty simple for my very first look. Indeed, the text size, the amount of links from pages, as well as the overall length of linked titles could all be computed with use of toolserver metadata.

However, articles do usually transclude templates, that have their own links and their own sizes. And those links are quite hard to recognize with use of toolserver sql tables.

pagelinks table contain all links to be shown whith the page they have source at. When a template page is shown it looks different to what it is being transcluded somewhere, and this is due to <include>-like constructions in templates.

Thus I have failed to recognize data on what templates link, and the only option I see is when all template pages are properly (in a certain sence) documented and structured. This templates cleanup activity is a task of complexity similar to connectity problems resolving. It's my current view.

Task of the day / Работа недели[править код]

Try a speedup on the followng MySQL query:

Вот задача, ускорить запрос на тулсервере:

# Caching page links to the given namespace for speedup.
#
# Nots: 1) Links to existent pages cached only, i.e. no "red links".
#       2) One of the key points here is that we hadn't try
#          saving pl_title somewhere, the resulting table this way
#          would be too huge.
#       3) Thanks to Magnus Manske for query importing to MyISAM suggestions
#
# Эта таблица ускоряет доступ к информации о ссылках
#
# Внимание: 1) Только ссылки на существующие страницы, без "красных ссылок"
#           2) Ключевая идея здесь состоит в том,
#              что мы не пытаемся сохранять значение pagelinks.pl_title
#              в таблицу, иначе она распухнет невообразимым образом
#           3) Спасибо Магнусу Манске за идею по оптимизации запроса для MyISAM
#
CREATE /* SLOW_OK */ TABLE pl (
  pl_from int(8) unsigned NOT NULL default '0',
  pl_to int(8) unsigned NOT NULL default '0'
) ENGINE=MyISAM AS
    SELECT pl_from,
           p_id as pl_to
      FROM ruwiki_p.pagelinks,
           ruwiki_p.page
     WHERE pl_title=page_title and
           page_namespace=num and
           pl_namespace=num;