Creating and parsing huge strings with javascript?
<p>I have a simple piece of data that I'm storing on a server, as a plain string. It is kind of ridiculous, but it looks like this:</p>

<pre><code>name|date|grade|description|name|date|grade|description|repeat for a long time
</code></pre>

<p>this string can be up to 1.4mb in size. The idea is that it's a bunch of student records, just strung together with a simple pipe delimeter. It's a very poor serialization method.</p>

<p>Once this massive string is pushed to the client, it is split along the pipes into student records again, using javascript.</p>

<p>I've been timing how long it takes to create, and split, these strings on the client side. The times are actually quite good, the slowest run I've seen on a few different machines is 0.2 seconds for 10,000 'student records', which has a final string size of ~1.4mb.</p>

<p>I realize this is quite bizarre, just wondering if there are any inherent problems with creating and splitting such large strings using javascript? I don't know how different browsers implement their javascript engines. I've tried this on the 'major' browsers, but don't know how this would perform on earlier versions of each.</p>

<p>Yeah looking for any comments on this, this is more for fun than anything else!</p>

<p>Thanks</p>
