Investigate query execution performance of playgrounds

XMLWordPrintableJSON

    • Type: Investigation
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Environment:
      OS:
      node.js / npm versions:
      Additional info:
    • None
    • Developer Tools

      Problem Statement/Rationale

      We recently got feedback from a user stating:

      Why the MongoDB client for vsCode is really slow ? I really the idea of a playground, it can be saved and variables and other cool stuff can be used, but its really slow.When compared to the MongoShell from the terminal or MongoShell from the MongoDB Compass. They're like really instant fast.
      
      It's just a simple findOne query based on an email match. Works fine, though. But it takes about 2-4 seconds. 

       

      Source: https://www.reddit.com/r/mongodb/comments/1fbm0bj/comment/lm41qyk/

       

      Rhys mentioned:
      We could speed this up by having a playground ready to execute already started up on the connection.
      I'd compare this to the startup time of the current embedded shell in compass, which also takes significant time to get started as it involves roundtrips and runtime startup. Related ticket there: https://jira.mongodb.org/browse/COMPASS-8256. When running a playground, there are a few things that take a bit of time: * The extension messages the language server to evaluate the playground

      • Language server starts a worker thread
      • Language server messages the worker thread to evaluate the code
      • Worker thread starts the runtime
      • Worker thread connects
      • Worker thread evaluates the code
      • Worker thread messages the language server the result
      • Language server messages the extension to show the results.

      We should check out the CPU usage for simple requests. I've seen a bit of a spike when the runtime starts. It may be slow on machines that aren't quick like ours. 

            Assignee:
            Unassigned
            Reporter:
            Gaurab Aryal
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: