Page MenuHomePhabricator

[Story] Reduce initialisation time of SiteLinks
Closed, ResolvedPublic

Description

We would like to reduce initialization time of SiteLinks and it's sub widgets as it is a main cause of the total render time according to T125502: [Task] Investigate time spent for initialization of individual widgets

Event Timeline

Jonas raised the priority of this task from to High.
Jonas updated the task description. (Show Details)
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 16 2016, 2:14 PM

We found that the _shortenPageName function in sitelinkview.js is one of the most time consuming details on the page now. For testing, here is one of the longest page titles on the live site: https://www.wikidata.org/wiki/Q229568

Change 271753 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
Never shorten page titles in sitelinks below 15 characters

https://gerrit.wikimedia.org/r/271753

Change 272475 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
Use binary search in sitelinkview._shortenPageName

https://gerrit.wikimedia.org/r/272475

@Lydia_Pintscher We should talk about this today, unless you already know what you want.

Change 272625 had a related patch set uploaded (by Adrian Heine):
Make long site links wrap nicely

https://gerrit.wikimedia.org/r/272625

Two versions of site id positioning:

@Incabell says vertical-align: middle.

Long words are an issue. I see three straight-forward workarounds. @Lydia_Pintscher @Incabell

Limit leakage to length of site id:

Break words wherever you want to:

Add scrollbar:

Option one and three are clearnly no-gos. Let's go with 2.

Current patch revision does good things: In chromium, it breaks on whitespace where possible, long words just randomly. In Firefox, it adds hyphens. Reviewers, please check in your browsers.

Change 272625 had a related patch set uploaded (by Adrian Heine):
Make long site links wrap nicely

https://gerrit.wikimedia.org/r/272625

Jonas added a comment.EditedFeb 25 2016, 11:15 AM

(Firefox)

adrianheine changed the status of subtask T127305: [Task] Change ellipsis from JS to CSS from Resolved to Declined.Feb 26 2016, 12:13 PM

@thiemowmde Do you consider this done or should we wait for T124786?

I linked T124786 so it doesn't get lost so easily, but I agree we can and should close this here for now.

Change 272625 merged by jenkins-bot:
Make long site links wrap nicely

https://gerrit.wikimedia.org/r/272625

Change 271753 abandoned by Thiemo Mättig (WMDE):
Never shorten page titles in sitelinks below 15 characters

Reason:
I4a26042 is merged, code does not exist any more.

https://gerrit.wikimedia.org/r/271753

Change 272475 abandoned by Thiemo Mättig (WMDE):
Use binary search in sitelinkview._shortenPageName

Reason:
I4a26042 is merged, code does not exist any more.

https://gerrit.wikimedia.org/r/272475

adrianheine closed this task as Resolved.Mar 1 2016, 8:58 AM
adrianheine moved this task from Backlog to Done on the Wikidata-Sprint-2016-02-16 board.
Krinkle changed the status of subtask T127305: [Task] Change ellipsis from JS to CSS from Declined to Resolved.Mar 17 2017, 10:40 PM