[COMPASS-7567] Running at 100% CPU for a script that inserts 5k records on slow connection Created: 09/Jan/24 Updated: 24/Jan/24 |
|
| Status: | Open |
| Project: | Compass |
| Component/s: | Embedded Shell, Performance |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Investigation | Priority: | Major - P3 |
| Reporter: | Bjorn Harvold | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
OS: Mac OS Sonoma |
||
| Attachments: |
|
| Assigned Teams: |
Developer Tools
|
| Description |
| Comments |
| Comment by Rhys Howell [ 17/Jan/24 ] | ||||||||||||||||||||||||||
|
bjorn.harvold@traveliko.com Printing a large json to the screen frequently is a costly procedure. In the script that's causing Compass to print so much it's slowed down. Short term I'd recommend updating the script to only printjson sometimes or write to a file in batches to improve the performance. Here's a minimal reproduction that spikes my cpu:
| ||||||||||||||||||||||||||
| Comment by Bjorn Harvold [ 11/Jan/24 ] | ||||||||||||||||||||||||||
|
Hi leroux.bodenstein@mongodb.com Yes, this is Compass's embedded mongosh client. Sample script:
| ||||||||||||||||||||||||||
| Comment by Le Roux Bodenstein [ 10/Jan/24 ] | ||||||||||||||||||||||||||
|
Hi bjorn.harvold@traveliko.com Is this in the embedded mongosh shell in compass? Can you send us an example of your script? | ||||||||||||||||||||||||||
| Comment by Bjorn Harvold [ 09/Jan/24 ] | ||||||||||||||||||||||||||
|
Attached a video where you can see that the app is not responsive at all when I try to click on some of the tabs. Took 10s to response to me clicking on one of the top tabs.. | ||||||||||||||||||||||||||
| Comment by Bjorn Harvold [ 09/Jan/24 ] | ||||||||||||||||||||||||||
|
Compass v1.41.0 | ||||||||||||||||||||||||||
| Comment by PM Bot [ 09/Jan/24 ] | ||||||||||||||||||||||||||
|
Hello bjorn.harvold@traveliko.com, thank you for reaching out to us! The team will review your issue and get back to you soon as soon as possible. Please review your issue to ensure you've included your environment details and have attached relevant logs (with any sensitive data redacted), so that we're best able to provide you a timely and thorough response. Thanks again! |