# Ridiculous load time for a huge string

**URL:** <https://forum.kirupa.com/t/ridiculous-load-time-for-a-huge-string/307230>\
**Category:** flash\
**Created:** [March 31, 2010, 2:07am UTC](https://forum.kirupa.com/t/ridiculous-load-time-for-a-huge-string/307230 "2010-03-31T02:07:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![45\_ACP](https://avatars.discourse-cdn.com/v4/letter/4/c4cdca/32.png) [@45\_ACP](https://forum.kirupa.com/u/45_ACP)\
**Post date:** [March 31, 2010, 2:07am UTC](https://forum.kirupa.com/t/ridiculous-load-time-for-a-huge-string/307230/1 "2010-03-31T02:07:13Z")

</div>

Hi,

I need to upload a ridiculously huge text file into Flash MX 2004 and turn it into an array. The loading part is not a problem: the issue is splitting the array.

The original string is approximately 531,000 characters long and needs to be turned into a multi-dimensional array of 3500 elements split into another 20 elements (array[3500][20]). Unfortunately when I try to make the initial split into 3500 elements (which I would later need to split again into 20 using a for loop) the Flash takes a ridiculous amount of time to load. Most of the time Flash just crashes: I tried splitting the string into just 50 elements and it took me around 7 seconds. My computer usually has no problems with basic tasks like these.

So, what should I do? Is there a way to change memory allocation to Flash? Should I split the string? Should I create multiple text files, load them into separate loadVars objects and split those? Or am I just trying to do something too big for Flash?

Thanks,  
-45 ACP

P.S. I know this whole thing sounds kind of bizarre, haha, if I need to clarify more I can!
