- Home /
Question by
drudiverse · Aug 26, 2015 at 08:55 AM ·
arraycompilerefficiency
In-Game-Compilation of 100kb .JS file during gameplay inefficient?
If i have many arrays written as text files hidden from system... i.e.
arrayvar = [0,1,2...,5000];
And i use File.Move command to rename the .txt to .js on the fly, in order to access the array without having to parse the .txt file... Is it a problem for processing spikes, performance, and so on? is it inefficient?
are there similar alternatives that would be so easy without resorting to JSON and other parsing options?
Comment
Compiling the code would be slower as the compiler would have to parse the entire text file in order to compile it, so either way you are parsing the textfile. If you know that you only need some of the text it would be faster to just read those lines as text and then parse them to an appropriate type.
Your answer