[SERVER-33900] Optimize for loops in bulk_shard_insert.js Created: 15/Mar/18 Updated: 22/Mar/18 Resolved: 22/Mar/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding, Testing Infrastructure |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Robert Guo (Inactive) | Assignee: | Samyukta Lanka |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Operating System: | ALL | ||||
| Sprint: | TIG 2018-03-26, TIG 2018-04-09 | ||||
| Participants: | |||||
| Linked BF Score: | 0 | ||||
| Description |
|
The JS code in bulk_shard_insert.js is causing the test to time out after we disabled the JIT. Some improvements can be made to speed up the test: 2. Cache the bulk array instead of creating it 250 times. If these changes are still not sufficient, we should consider reducing the number of inserted documents. |
| Comments |
| Comment by Samyukta Lanka [ 22/Mar/18 ] | ||||
|
Resolved by Note: Removing the toArray() call ended up not making a significant difference. The main source of time came from the number of documents being iterated. The test no longer times out:
|