Optimizing performance

0
I have many logics in a loop and it took 30 minutes for me to complete the excel import of 13k data because of that. What can I do to improve the performance duration? or what can you recommend to make it faster.
asked
3 answers
2

Hi John,

 

Try batch processing the data or use process queue to do the task you are doing in the microflow. And also make your microflow asynchronous to make it run in the background.

 

Hope this helps!

answered
2

Well, 30 minutes is already 1800 seconds, so your upload does about 7,5 per second (assuming you mean 13k datarows, not 13kB data).

Biggest tip is what John said: make the Excel import a simple straight up import of the data. Make it into an object having the exact same format as the data in your Excel. That way you know the import has gone right, and you can worry about the processing later.

Now it is later, processing time and you want to use John’s tip: queueing. First option is to download and install https://marketplace.mendix.com/link/component/393/Mendix/Process-Queue for that. Second option is to upgrade to 9.12 for its way less complicated queueing-function: Tasks. See https://docs.mendix.com/refguide/task-queue/

answered
0
  • Avoid creating many object/variable attributes inside the loop
  • Implement the offset and limit to iterate the 13k records. Process the 1k records in a batch. A blog will explain the limits and offset concept https://www.mendix.com/blog/limits-and-offsets/ 
  • Commit your objects outside of the loop when processing the records
answered