It's a large library and we use it for reverse engineering thumbnail urls which should really be available to the client without any calculation.
Description
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Remove the md5 library | mediawiki/extensions/MobileFrontend | master | +12 -409 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Jdlrobson | T93258 md5 library should be removed from MobileFrontend | |||
Open | None | T76827 [Story] Image thumbnail urls should be included where applicable in wikidata API response for commonsMedia |
Event Timeline
Change 192855 had a related patch set uploaded (by Jdlrobson):
Remove the md5 library
Change 192855 abandoned by Jdlrobson:
Remove the md5 library
Reason:
Let's continue discussion in bug report.
From my last comment on 192855:
If you run md5.js through the Google Closure compiler then its size drops from 3.71KB gzipped to 1.42KB gzipped (61.79%!).
The Gzipping is not really the issue. I just don't think we should need a library for this sort of thing... Every little adds to the payload (Bear grillz remember)!! On a side note I'm not 100% sure of how good/maintained this library is.
Ping @Jdlrobson. What's going on with this card? Do you think that investigating alternative implementations might be worthwhile? Are you still unhappy with browser vendor's attitudes towards exposing native hashing libraries? ;)
It's a lot of code simply to reverse engineer a thumbnail url.
If we reverse engineer it using native browser code by all means that would be a huge win. what method were you thinking of?
There isn't one. I was being silly.
How about we create an MobileWikidataInfobox API for doing the munging server side and let the client to the presentation?
Edit
That'd mean that there'd be two moving parts to this but it'd be cleaner and you could drop the crazy JavaScript MD5 library.
I think the url should be served in the page as a config variable, or returned by the api (see T76827)
Right now the infobox is all that uses it so it's not a big deal and we have no plans to put that in alpha but it's infrastructure we should prepare in case we ever want to do something similar.
The core problem here has not been fixed but the infobox code is no longer in MobileFrontend