Memory problem: able to trap and report errors, and provide a workaround.
Posted by mholmes on 25 Mar 2008 in Activity log
I've implemented a more sophisticated system for handling out of memory errors:
TTransformList
now has the ability to retrieve and store error messages when executing a script operation.- The main form routine
ProcessExternalFile
can now keep track of these as they go by, and report them to the calling procedure. - The Batch screen can now keep a list of all these errors, and show them to the user via a temp file saved to disk.
- I've confirmed that the operation was running out of memory about 68 files in, so I upped the minimum memory to
1000000
by default, but I've also implemented a system whereby you can pass a memory value to Transformer on the command line (-jsmem=1000000
), and if it's larger than the minimum, then theTTransformList
'sJSEngine
will be created with the larger value. This (coupled with proper documentation) will give users a way to get around out-of-memory errors if they occur. - I had to tweak one of the Italian translation strings, to add a new formatting variable for the number of script runs during a batch operation, since this is now reported at the end of the process. If the placeholder is missing, then you get an exception.