Hello.
I have trouble with this a lot of times, usually, I just hit enter in my script, and recompiles. But now, I have a script with 2600 lines, and it isn’t that easy all the sudden.
I have some questions about remedies for the internal table. I have read this post: Script has grown too large for editors.
-
Does it help to encapsulate globals in a script object?
-
will it help to have globals stored into lists, to save declarations?
-
Will it help to encapsulate larger parts of the script into script modules within it, and will this slow my script down? … (I need all the speed I can get.
-
Does number of subroutines count?
-
Can bugs ” uncatched lead to this?
I do have script objects in my cody, that I copy into globals, to ensure that I start afresh whenever the script is run, is that a bad practice?
*Does it help to replace literal strinconstans with a variable, containing the same constant. (I.e is the compiler smart enough to replace every instance of a string constant with one of them, or are they looked upon as individual entities?
The string constansts are permeated through my code. I have three globals defined which are having this structure copied into it at run time:
script dataItem
property raw : {}
property sorted : {}
property reltable : {}
property inv_reltable : {}
property display_list : {}
property isDirty : true
property dsp_offset : 0 as integer
end script
The properties are used liberally through more subroutines than not, and those not having them as globals, those takes the them as parameters.
I also have a great number o top level properties in my script, for localization. And, there isn’t really that much code to eventually dump out after initialization, and the code are 100% factored to subroutines, by tomorrow, as I have three left, and three lines of code to replace with a handler.
I have questions about the internal table, knowing nothing about it. for instance; if I encapsulate the strings into a script object, won’t that lead to even more table references?
Is this internal structure, is it a flat table, or is it nested? Does it only consist of objects, or is it used to dereference?
I addition to this, and what is said in the post above, I hope you tell me which questions, I really should have asked!
Thanks