File Import Performance Issue

0
Hi, Is it possible to bulk commit proxy objects in a mendix project? I have tried out IChangeBatch but it seems it doesn't accept proxy object but only IMendixObjects? Our import logic is working fine but no luck optimizing it. Thanks in advance. Regards, Sharad
asked
4 answers
3

Do NOT use the Java API for batches in 4 anymore, it has been deprecated since Mendix 4 (as mentioned at https://world.mendix.com/display/refguide4/Moving+from+3+to+4) and will be removed in Mendix 5.

Instead you can just commit lists of Mendix objects, simply with Core.commit(context, objects) where objects is a list of IMendixObject. If you only have the proxy classes then you could make a list of the actual IMendixObjects just for the purpose of committing.

answered
0

All Proxy objects have IMendixObject (the function for that is getMendixObject()).

If fact all data in Mendix is a IMendixObject, the proxies are for your convenience because they have the attributes as Java members.

answered
0

HI Chris,

Thanks for the help. But that too isn't working. If anyone with similar issue has worked something out, a code example would surely help.

Thanks, Sharad

answered
0

In case someone stumbles upon a similar issue, here is what we did.

We used CTL's to load data from files into a temporary oracle schema, not the mendix schema. Then we used mendix DatabaseReplication utility to bring in the data from temporary tables to our mendix application.

You need to have some custom Java actions to invoke the shell scripts to load the data. But that is pretty easy to implement. Do note the need of synchronization issues which would arrive in case you want to import and process at the same time. You would need more complex java actions here.

This increased the import speed a thousand times in our application. Do let me know in case you need any further assistance in setting this up.

Thanks,
Sharad R K

answered