Page MenuHomePhabricator

Architecture/Performance Review for 'Popups' extension
Closed, ResolvedPublic

Details

Reference
bz61742

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:00 AM
bzimport added a project: Page-Previews.
bzimport set Reference to bz61742.

Here are some numbers that might help-

---------------------+-------------+------------
PerformanceUnminifiedMinified
---------------------+-------------+------------
JavaScript15770 bytes6432 bytes
CSS (Compiled LESS)8122 bytes6152 bytes
---------------------+-------------+------------
Total23kb12kb
---------------------+-------------+------------
Time (in ms)
on 3mbit/s~80ms~40ms
---------------------+-------------+------------

Resources

  • Resources being loaded:
    • mediawiki.api
    • mediawiki.jqueryMsg
    • moment [5]
  • schema.Popups being loaded if EventLogging[4] is present
  • Resources for the extension itself:
    • resources/ext.popups.core.js
    • resources/ext.popups.core.less
    • resources/ext.popups.animation.less

Requests

Apart from the request being made to load the resources a request[1] is made every time a user hovers over a link, this request is aborted if the mouse moves elsewhere. Amongst other things the API call also requests for a 300px thumbnail using the PageImages extension. All successful requests are cached[2] in JavaScript.

Others

  • Animations are being done in CSS.
  • Links clicks are being hijacked[3] for logging events.

[1] http://git.wikimedia.org/blob/mediawiki%2Fextensions%2FPopups.git/dbfd8f415e027c75097ebb0c0c6986900a6592a5/resources%2Fext.popups.core.js#L32
[2] http://git.wikimedia.org/blob/mediawiki%2Fextensions%2FPopups.git/dbfd8f415e027c75097ebb0c0c6986900a6592a5/resources%2Fext.popups.core.js#L82
[3] http://git.wikimedia.org/blob/mediawiki%2Fextensions%2FPopups.git/dbfd8f415e027c75097ebb0c0c6986900a6592a5/resources%2Fext.popups.core.js#L284
[4] https://bugzilla.wikimedia.org/61880 (PATCH_TO_REVIEW)
[5] https://bugzilla.wikimedia.org/61481 (PATCH_TO_REVIEW)

Can you project how many users will have this feature enabled?

I don't, but I've added some people who might :)

(In reply to Ori Livneh from comment #3)

Can you project how many users will have this feature enabled?

The project will be considered finished when this is enabled by default for all anonymous users.

Note: We, obviously, need detailed user testing and information on user acceptance before we could even consider this end goal, and we're nowhere near that stage yet. If the intended audience find it annoying, we'd never roll it out. But that's our idealistic end goal. In the interim time, it'll be whoever turns the it on in their beta preferences.

swalling wrote:

(In reply to Dan Garry from comment #5)

(In reply to Ori Livneh from comment #3)

Can you project how many users will have this feature enabled?

The project will be considered finished when this is enabled by default for
all anonymous users.

Yes, we should design this so it is performant enough for all readers to see.

However, the first deployment will be as a Beta Feature, so the upper limit is all registered users on all wikis. This is unlikely however, since all Beta Features are opt-in only. For other popular Beta Features other than VE, we're seeing 5-6k registered users on enwiki, fewer on other wikis. Maybe a total of ~10,000 users across all wikis? We can get a precise number from preferences data if we need to.

It performs well enough for beta deployment. If / when we enable it more broadly, I'd like to have a second look, for but for now: god speed!

(In reply to Ori Livneh from comment #7)

It performs well enough for beta deployment. If / when we enable it more
broadly, I'd like to have a second look, for but for now: god speed!

Noted. We won't deploy more broadly without a more thorough review. Thanks Ori!

Prtksxna raised the priority of this task from Medium to Needs Triage.Dec 3 2014, 5:30 AM
Prtksxna moved this task from Backlog to Archive on the Page-Previews board.