-
Notifications
You must be signed in to change notification settings - Fork 20.5k
Open
Labels
Milestone
Description
Today each promise operation has it's own setTimeout creating many async events.
The aplus spec allows promise operations to be grouped (see note 3.1) and the operations also don't have to be strictly async, as long as they are called by "platform code" (see 2.2.4).
Grouping the operations and reducing setTimeouts will:
- Improve performance by having less timeouts/async events
- Reduce the probability of aplus tests failing with
Error: timeout of 200ms exceedederrors. I see this locally fairly often. - Allow other "platform code" to flush the pending promise operations. For example load-before-ready (jQuery 3 - window load inside ready state will not be triggered #3194, Ready is much too late. #3197) could be fixed by flushing the pending promise operations on the DOMContentLoaded event.
timmywil, fabien and Krinkle