-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Minor - P4
-
None
-
Affects Version/s: 2.5.0
-
Component/s: Performance, Write Ops
-
None
-
ALL
-
Seems like adding a $sort to a $push + $slice commands results in an unreasonably large slowdown. A slowdown is expected for large arrays, but it is surprising to see a 5x change when sorting an already sorted array of length 100.
Note: I have only tested this on 2.5.0, dont have comparisons between versions
Results from reproduction code using benchRun on various array sizes:
Array length 1:
Sort: 18280
No sort: 19936
Change: 1.1x
Array length 10:
Sort: 15300
No sort: 19400
Change: 1.3x
Array length 100:
Sort: 3230
No sort: 16660
Change: 5.2x
Array length 1,000:
Sort: 230
No sort: 2176
Change: 9.5x
Array length 10,000:
Sort: 70
No sort: 450
Change: 6.4x
Array length: 100,000:
Sort: 30
No sort: 260
Change: 8.7x
- is related to
-
SERVER-10159 Evaluate performance of new update framework and first pass optimization
- Closed