Unresponsive "Documents" view for data with big arrays

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 1.17.0
    • Affects Version/s: 1.15.0
    • Component/s: Compass
    • None
    • Iteration Naan, Iteration Octopus, Iteration Paneer, Iteration Qbert, Iteration Ratatouille, Iteration Sriracha
    • None
    • None

      When trying to view the data on a collection which has documents with big arrays in it, the compass UI gets completely unresponsive. The same problem is encountered in Aggregations tab as well.

      The problem is common for most of IoT projects, it's not unusual to see such documents there. 

      Below the script to simulate the issue:

      const DATA_SIZE  = 60 * 60 * 12 // every second for 12 hours
      const adjectives = 'autumn hidden smiling bitter misty'.split(' ')
      const nouns      = 'waterfall river carefully breeze moon rain'.split(' ')
      
      const getRandomNumber = limit => (Math.random() * limit).toFixed(4) * 1
      
      function insertData(left, right, coll) {
          print(`inserting: ${left}-${right} `)
          coll.insert({
              serverName : `${left}-${right}`,
              hostName   : `${left}${right}.local`,
              eventName  : right,
              data       : generateRandomData(DATA_SIZE)
          })
      }
      
      function generateRandomData(size) {
          var temp = []
          for(let i = 0; i < size; i++ ) {
              temp.push({
                  ts : new Date().getTime() + i,
                  v  : i + getRandomNumber(1000)
              })
          }
          return temp
      }
      
      function populateCollection(coll) {
          coll.drop()
          coll.createIndex({serverName: 1, eventName: 1})
          adjectives.forEach(adj => nouns.forEach(noun => insertData(adj, noun, coll)))
      }
      
      populateCollection(db.iot)
      
      print('Enjoy!')
      
      

       

            Assignee:
            Durran Jordan
            Reporter:
            Vlad Banishevskii
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: