title: JSON.stringify is very slow for large objects
body: <p>I have a very big object in javascript (about 10MB).</p>
  
  <p>And when I stringify it, it takes a long time, so I send it to backend and parse it to an object( actually nested objects with arrays), and that takes long time too but it's not our problem in this question.</p>
  
  <p><strong>The problem:</strong></p>
  
  <p>How can I make <code>JSON.stringify</code> faster, any ideas or alternatives, I need a javaScript solution, libraries I can use or ideas here.</p>
  
  <p><strong>What I've tried</strong></p>
  
  <p>I googled a lot and looks there is no better performance than <code>JSON.stringify</code> or my googling skills got rusty!</p>
  
  <p><strong>Result</strong></p>
  
  <p>I accept any suggestion that may solve me the long saving (sending to backend) in the request (I know its big request).</p>
  
  <p><strong>Code Sample of problem (details about problem)</strong></p>
  
  <pre><code>Request URL:http://localhost:8081/systemName/controllerA/update.html;jsessionid=FB3848B6C0F4AD9873EA12DBE61E6008
  Request Method:POST
  Status Code:200 OK
  </code></pre>
  
  <p>Am sending a POST to backend and then in <strong>JAVA</strong></p>
  
  <p>request.getParameter("BigPostParameter")</p>
  
  <p>and I read it to convert to object using</p>
  
  <pre><code> public boolean fromJSON(String string) {
          if (string != null &amp;&amp; !string.isEmpty()) {
              ObjectMapper json = new ObjectMapper();
              DateFormat dateFormat = new SimpleDateFormat(YYYY_MM_DD_T_HH_MM_SS_SSS_Z);
              dateFormat.setTimeZone(TimeZone.getDefault());
              json.setDateFormat(dateFormat);
              json.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true);
              WebObject object;
  //            Logger.getLogger("JSON Tracker").log(Level.SEVERE, "Start");
              try {
                  object = json.readValue(string, this.getClass());
              } catch (IOException ex) {
                  Logger.getLogger(JSON_ERROR).log(Level.SEVERE, "JSON Error: {0}", ex.getMessage());
                  return false;
              }
  //            Logger.getLogger("JSON Tracker").log(Level.SEVERE, "END");
              return this.setThis(object);
          }
          return false;
      }
  </code></pre>
  
  <p><strong>Like This</strong></p>
  
  <pre><code>BigObject someObj = new BigObject();
  someObj.fromJSON(request.getParameter("BigPostParameter"))
  </code></pre>
  
  <p><strong>P.S</strong> : FYI this line  <code>object = json.readValue(string, this.getClass());</code>
  is also very very very slow.</p>
  
  <p><strong>Again to summarize</strong></p>
  
  <ul>
  <li><p>Problem in posting time (stringify) JavaScript bottle nick.</p></li>
  <li><p>Another problem parsing that stringified into an object (using jackson), and mainly I have svg tags content in that stringified object as a style column, and other columns are strings,  int mainly</p></li>
  </ul>