Last modified: 2014-10-02 17:55:03 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 T73474, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 71474 - Flow uses synchronous XMLHttpRequests
Flow uses synchronous XMLHttpRequests
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
Flow (Other open bugs)
master
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-30 16:53 UTC by Matthew Flaschen
Modified: 2014-10-02 17:55 UTC (History)
5 users (show)

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


Attachments

Description Matthew Flaschen 2014-09-30 16:53:54 UTC
Flow uses a synchronous XMLHttpRequest.  These should be avoided since it blocks waiting for a network response, and can create a bad UX.

For this reason, it's been actively deprecated in recent Firefox (30+), when used on the main thread (https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest), and will log a warning.

It is used in mw.flow.parsoid.convert.  This in turn is called twice, both from ext.flow.editor.js:

1. mw.flow.editor.load - https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FFlow/a4eda372ccbd733ff741d3e1369c25a1e561fcf0/modules%2Feditor%2Fext.flow.editor.js#L88 -  This is using promises already, so it should be straightforward to use an async call here.

2. mw.flow.editor.getContent - https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FFlow/a4eda372ccbd733ff741d3e1369c25a1e561fcf0/modules%2Feditor%2Fext.flow.editor.js#L88 - This is synchronous, and used by FlowBoardComponent.UI.events.globalApiPreHandlers.prepareEditor.  For this one, it also seems like it would be better to do the HTML->wikitext conversion on the server if possible, rather than round-trip a XHR call then post.
Comment 1 Danny Horn 2014-10-02 17:55:03 UTC
in backlog: https://trello.com/c/srayZcqf

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


Navigation
Links