Last modified: 2013-08-22 17:58:36 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 T53853, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 51853 - Comment advising developers to add ResourceLoader dependent modules directly
Comment advising developers to add ResourceLoader dependent modules directly
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
ResourceLoader (Other open bugs)
1.22.0
All All
: Normal normal (vote)
: ---
Assigned To: Matthew Flaschen
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-23 09:24 UTC by Matthew Flaschen
Modified: 2013-08-22 17:58 UTC (History)
6 users (show)

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


Attachments

Description Matthew Flaschen 2013-07-23 09:24:16 UTC
Right now, ResourceLoader does not walk the dependencies on the server.  As noted in ResourceLoaderModule:

"When adding a module on the server side, dependency information is NOT taken into account and YOU are responsible for adding dependent modules as well. If you don't do this, the client side loader will send a second request back to the server to fetch the missing modules, which kind of defeats the purpose of the resource loader."

It seems that if this is actually a performance issue, we should walk (expand) the dependency tree on the server.  Otherwise, it's essentially pushing work onto the clients of ResourceLoader.
Comment 1 Krinkle 2013-07-23 12:17:48 UTC
Comments don't run. And I don't think that comment is accurate (or ever was?), if it isn't inaccurate, it is ambiguous and means something else than you think.

Can you elaborate on an actual issue that supposedly results from this? (e.g. a second request, or dependencies missing).

I could talk for a while about why it by design and actually improving performance that we do not do dependencies on the server. However I'll save that for later if it is needed, let's get a grip on an actual problem first.
Comment 2 Matthew Flaschen 2013-07-26 03:40:08 UTC
The part about "When adding a module on the server side, dependency information is NOT taken into account" is accurate.  It is only taken into account on the client.

I don't think I've seen a confirmed example of it adding extra requests, which is why I said "if this is actually a performance issue".

If this is by design, and developers need not "add[...] dependent modules as well" the comment should obviously be removed.
Comment 3 Gerrit Notification Bot 2013-08-22 17:31:43 UTC
Change 80408 had a related patch set uploaded by Mattflaschen:
Remove comment saying code should add RL dependencies directly

https://gerrit.wikimedia.org/r/80408
Comment 4 Gerrit Notification Bot 2013-08-22 17:57:59 UTC
Change 80408 merged by jenkins-bot:
Remove comment saying code should add RL dependencies directly

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

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


Navigation
Links