I am creating a program in Aptana (ruby IDE) and doing a ton of math on a ruby array and often adding more math, creating variables from the results. Doing more math from there, ect. However each time I run my script it first has to re read my file (a few megabytes) and put it into the array. Which takes time.
Now I'm really new to programming so I'm still lacking some understanding to how programming in general works. But how would I fix this problem?
If I were to guess how this would be done. I would say maybe split my program up into 2 files and run the array one without it stopping. And the other ruby file would use the array file. I don't know how that would be done though.
Am I close to the solution?
Also I hope you noticed that I said I'm developing in aptana. I haven't even tried running my scripts normally. I'm assuming that I would have the exact same problem there.