Last modified: 2013-09-26 12:55:10 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T53073, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 51073 - ULS loads many webfonts needlessly on page load
ULS loads many webfonts needlessly on page load
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
UniversalLanguageSelector (Other open bugs)
unspecified
All All
: Normal normal with 1 vote (vote)
: MW 1.22 version
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 53015
  Show dependency treegraph
 
Reported: 2013-07-09 21:53 UTC by Eduard Braun
Modified: 2013-09-26 12:55 UTC (History)
12 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Eduard Braun 2013-07-09 21:53:11 UTC
I'm noticing considerably delayed page load since ULS became active on some pages ([[en:Special:RecentChanges]] is an impressive example).

I realized this is because of ULS loading a whole lot of webfonts only to use them on foreign language names in the "Languages" list on the left. Those are language versions of Wikipedia I hardly ever visit. Therefore the webfonts are not used anywhere else and downloading them is quite pointless. Actually the language names are shown fine without the need for additional fonts, that's how it worked for years now.

Therefore I strongly suggest to *not* download webfonts only for the languages list. This is pointless and only adds a huge overhead for no gain at all.

Alternatively add a hard switch to disable loading of webfonts completely (there is the setting to use "system font" currently but it doesn't influence the behavior described above but loads webfonts nonetheless).

The third option is to finally accept and fix bug 46306 so users can decide themselves if they want webfonts to be downloaded or not.
Comment 1 Eduard Braun 2013-07-09 21:56:17 UTC
Please note that bug 49935, bug 50836 and bug 33018 might be related but are not the same! They are probably adding to the delayed page load I'm noticing but fixing those bugs wont solve the underlying problem of needlessly loaded webfonts described in this bug!
Comment 2 Nemo 2013-07-09 21:57:01 UTC
This looks like a duplicate of bug 49935, which also started with a report about RecentChanges.
Comment 3 Eduard Braun 2013-07-09 22:11:13 UTC
Have you read comment 1 Nemo? I explicitly stated it is *not* a duplicate of those bugs.

The linked bugs are about optimizing performance of loading of webfonts.
This bug is about not loading them at all if not necessary.

While the existing bugs might account for suboptimal code, they can't speed up font loading itself (which might take considerable time on slow connections and waste valuable data volume on limited/expensive mobile connections).
Comment 4 Nemo 2013-07-09 22:25:05 UTC
(In reply to comment #3)
> Have you read comment 1 Nemo? 

Not before writing mine; I had a mid-air collision, as timestamp hints.

> I explicitly stated it is *not* a duplicate of
> those bugs.

That's not enough to actually *make* it not a duplicate ;) but devs will know.
Comment 5 Andre Klapper 2013-07-10 09:18:45 UTC
(In reply to comment #0)
> Actually the language names are shown fine without the need for 
> additional fonts, that's how it worked for years now.

I can imagine that this would be the statement to be challenged - I always had some squares etc. displayed for some rather exotic languages/scripts, so I'm not sure if the loading is really "needless" if those are now displayed correctly.

If I get you correctly, I'm tempted to change the bug summary from "ULS loads many webfonts needlessly on page load" to "ULS should not load webfonts only because of entries in the 'Other languages' list" (which would enhance funtionality and turn this into an enhancement request).
Comment 6 Eduard Braun 2013-07-10 09:43:59 UTC
No, I think your proposed summary doesn't fit my concerns well. Actually I have several reasons for that:
1) As pointed out I'd also be happy (if not happier) with a more general solution (e.g. turning of usage of webfonts completely as a user setting, or even solving bug 46306).
2) There are also other cases were loading of webfonts would not be really necessary, e.g. pages which include many translations (like [1]), which are hidden from the user anyway but get initially loaded (including webfonts) on page load.
3) Since this will always delay page load (even after the performance issues described in the mentioned bugs are solved) and potentially wastes bandwidth and data volume for many users (as pointed out in comment 3), this is no enhancement but should be considered a bug.

[1] http://commons.wikimedia.org/wiki/Commons:Administrators%27_noticeboard/User_problems
Comment 7 Andre Klapper 2013-07-10 10:36:10 UTC
I see. Would the proposal in bug 51102 tackle most of this problem?
Comment 8 Eduard Braun 2013-07-10 11:03:50 UTC
If it was implemented in a way that webfonts can be disabled for all languages at the same time this would be an appropriate solution I assume.

Since I'm not familiar with the implementation details of ULS:
Would the proposed solution in bug 51102 (allow to select if and what webfont is used for HTML elements with lang="xy" attribute set) disable webfonts everywhere in the UI or are there places webfonts are applied by ULS where this would not suffice?
Comment 9 Niklas Laxström 2013-07-10 20:09:24 UTC
I don't think there is consensus that loading webfonts for interlanguage links is always useless.

I see few options:
1) do nothing
2) exclude those elements from webfonts (there is similar system as for input methods)
3) produce a special small font that contains all the glyphs needed to display all the native language names

Both 2) and 3) are problematic because there are many other places besides interlangugea links where language names are present (the many non ULS language selectors, translatable pages etc.). Those would need continuous maintenance.

I would prefer 1), since it is simplest and has the least amount of maintenance needed. If the reason for creating this bug is that loading the fonts is slow, we can fix this by improving the performance of ULS (one performance fix was already deployed today).

I would dupe this to bug 50836.
Comment 10 Siebrand Mazeland 2013-08-06 06:57:50 UTC
We're going to develop a font that will be able to display all the autonyms used in ULS, including autonyms used in MediaWiki. This will reduce the number of web fonts that have to be loaded for pages with many interlanguage links, and will also ensure a complete display of the currently used autonyms in ULS.

Tracked as https://mingle.corp.wikimedia.org/projects/internationalization/cards/1865. No guarantees on delivery yet, because it's not planned for development, but I think that in about two months we should have something for this.
Comment 11 Siebrand Mazeland 2013-08-06 07:31:52 UTC
Going to dupe to bug 40874.

*** This bug has been marked as a duplicate of bug 40874 ***
Comment 12 Eduard Braun 2013-08-06 20:41:58 UTC
I tend to reopen this bug because the autonyms were only part of the problem and I used this list only as an example since it was most obvious.

Actually(especially on Commons) there are many other places were various translations of the same text are offered by various translation templates. Most of the time one is only interested in his/her native language (or maybe English), therefore loading of webfonts wouldn't be necessary in this case either. The proposed solution for bug 40874 won't solve the problem, though.

The easiest solution would still be to either
- offer an option to completely disable ULS when the user knows he does not need it (bug 46306)
- offer an option to easily disable all webfonts (bug 51102)

To account for the fact that the newly developed font will mitigate the worst part (loading of almost all webfonts at one time when visiting a page with many translations) I lowered the importance of this bug.
Comment 14 Nemo 2013-09-20 06:43:05 UTC
Oh, and (3) is tracked at bug 40874 so we can close this AFAICS.
Comment 15 Nemo 2013-09-26 12:55:10 UTC
(In reply to comment #13)
> I'm told this was partially fixed.
> 
> (In reply to comment #9)
> > I see few options:
> > 1) do nothing
> > 2) exclude those elements from webfonts (there is similar system as for input
> > methods)
> > 3) produce a special small font that contains all the glyphs needed to
> > display
> > all the native language names
> 
> (2) was done, as far as I understand.

I found a more detailed explanation in the last [[mw:MLEB]] announcement: «Web fonts are no longer loaded for autonyms in the interlanguage area. This is a temporary change to improve performance; a more comprehensive fix may be done in the future.»

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links