This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
perf: improvements to $q #8300
Closed
Description
This is a meta issue to track performance improvements to be made in $q
for 1.3.0.
The main problems to be solved within the scope of this issue:
- Reduction of deferred instance memory to reduce GC pressure. One quick win is to move instance methods to prototype instead of created inside constructor.
- Some learnings should be taken from bluebird, which has a very fast promise implementation.
Related issues:
- $q is probably due for a rewrite #5223 (suggests rewriting $q, mentions memory pressure)
- Decouple $q in AngularJS 2.0 (and/or switch to bluebird) #6697 (focused on decoupling promise lib in Angular)
There is a PR from @caitp which updates A+ compliance, adds ES6-like constructor API, and begins to experiment with porting bluebird to $q (but with many tests failing): #8067. I've suggested simplifying that PR to not include perf improvements.
Benchmarks: