Home › Forums › Development › SampleData Size Limitation
Tagged: Sample Data, Size Limitations
- This topic has 1 reply, 2 voices, and was last updated 8 years, 9 months ago by Ed Shaw.
-
AuthorPosts
-
-
August 24, 2015 at 1:15 pm #329Ed ShawKeymaster
Another challenge we’ve been having with the SampleDataLoader is the data limitation on the “getData” methods.
Some of the data we load or migrate are several thousand objects, eg. Acts, and Holdables for 2 quick examples. When trying to load these, the system errors out saying:
1234567891011121314151617181920Caused by: nexj.core.meta.MetadataValidationException: Too much code in one function. (err.compiler.codeOverflow)Location={"typeName"="Event", "class"="Holdable", "resourceName"="classes/Holdable.meta", "event"="getHoldableData", "args"=0}at nexj.core.scripting.Compiler$PCodeBuffer.copyTo(Compiler.java:4975)at nexj.core.scripting.Compiler$GetFunctionInstruction.generateFunction(Compiler.java:4044)at nexj.core.scripting.Compiler$GetFunctionInstruction.generate(Compiler.java:3960)at nexj.core.scripting.Compiler.compile(Compiler.java:191)at nexj.core.scripting.Compiler.compile(Compiler.java:143)at nexj.core.meta.Event.compile(Event.java:1437)at nexj.core.meta.Metaclass.compile(Metaclass.java:2780)at nexj.core.meta.Metaclass.compile(Metaclass.java:2787)at nexj.core.meta.Metaclass.compile(Metaclass.java:2787)at nexj.core.meta.Metaclass.compile(Metaclass.java:2787)at nexj.core.meta.Metaclass.compile(Metaclass.java:2787)at nexj.core.meta.Metaclass.compile(Metaclass.java:2536)at nexj.core.meta.xml.XMLMetadataLoader$79.fixup(XMLMetadataLoader.java:3528)at nexj.core.meta.xml.XMLMetadataHelper.fixup(XMLMetadataHelper.java:1549)at nexj.core.meta.xml.XMLMetadataLoader.load(XMLMetadataLoader.java:1990)… 14 moreCaused by: nexj.core.scripting.CompilerException: Too much code in one function. (err.compiler.codeOverflow)URL=nullThis prevents us from entering a good amount of data. This might just be a hard limitation in the framework code since no one should write a function that long and unoptimized, however for data load purposes, we need functions to handle several thousand lines of code.
What can we do about this issue?
0 -
August 25, 2015 at 10:45 am #332Ed ShawKeymaster
This means that there are more than 128KB of instructions inside a function.
It looks like the script should be less code-intensive and more data-intensive.I have edited the script somewhat, please try the attached version.
Also, it will go faster, if you read all the currencies in one shot and put them into a hash table ((make-hashtable), (hashtable-…))Or cache them, e.g. with SysCache’put/getTransient
1
-
-
AuthorPosts
- You must be logged in to reply to this topic.