Page MenuHomePhabricator

md5 library should be removed from MobileFrontend
Closed, ResolvedPublic

Description

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.

Event Timeline

Jdlrobson raised the priority of this task from to Needs Triage.
Jdlrobson updated the task description. (Show Details)
Jdlrobson added a project: Web-Team-Backlog.
Jdlrobson moved this task to Incoming on the Web-Team-Backlog board.
Jdlrobson subscribed.

Change 192855 had a related patch set uploaded (by Jdlrobson):
Remove the md5 library

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

Change 192855 abandoned by Jdlrobson:
Remove the md5 library

Reason:
Let's continue discussion in bug report.

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

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.

… or just get the API to return it.

Jdlrobson claimed this task.

The core problem here has not been fixed but the infobox code is no longer in MobileFrontend