We are currently importing XMG through Java API with the following code:
MegaRoot.invokeFunction("MegaImport", xmgFilePath, rejectedCommandFilePath, options);
Nevertheless we are creating large files (15Mb, 40k commands) that require a long time for import:
~20 minutes on modern hardware
~50 minutes on an older one.
Since the import is quite long, we have no possibilities for monitoring progresses of the import, and users have to wait without knowing if something bad happened.
Two possibilities we are searching for are:
1) Would it be possible to launch the Import Mega File Dialog with Java API, instead of a silent import?
This would allows users to see the progression, and have a direct access to logs.
2) Is there any recomandation for drastically improve performances when importing XMG files?
there are a few options you could play with to make it more performant, but with such a big file it will take a while anyways, like validation=AtEndonSuccess. You can find all the possible options in the API reference guide I believe.
It's been a while, but I thought that if you launch the import through script/API that the Import progress screen is displayed?
Note also that you can increase the value of the option 'Maximum heap size in M.' from 128 to 512
Thanks for your help.
I didn't find any way for showing the Import Mega File Dialog.
But I've speed up the process by externalizing the import call.
The API MegaRoot.invokeFunction("MegaImport", xmgFilePath, rejectedCommandFilePath, options) is 3 or 4 times faster if you call it from an external JVM than into a Java Macro.
More precisely, my macro just creates an external JVM and quit, without waiting external JVM process.
If it waits the end of the external JVM, performances are still bad.
1) GUI for Import command
The « servermode=on » option activates GUI.
2) Java call and performances
Please, can you provide more details on your tests so that we can reproduce in the same conditions ?