Import scripts and probably other maintenance script call things like doEdit() or (onArticleEdit() directly) which builds up $wgDeferredUpdateList. These updates are not done until it finishes whatever it was doing, which means the $wgDeferredUpdateList array can get huge and slow.
Maybe:
(a) they should call wfDoUpdates() around wfWaitForSlaves(). This is simple but requires script writers to remember non-obvious crap
(b) stuff that uses wgDeferredUpdateList does it immediately if in cli mode
(c) stuff that uses wgDeferredUpdateList does do (nor defer) updates when in cli mode. Callers would have to do whatever themselves (which could lead to duplicated code).
Version: 1.17.x
Severity: minor