Display data in datagrid2 through microflow taking time

0
I am retrieving the list from Mendix DB approx 31000 through microflow (with XPATH) and showing it in datagrid2 with having 16 columns. It took  approx 6 to 8 sec to show in the list (10 at one time). I have also tried with batch process it is also taking almost same time. Also tried indexing on some of attribute which is also not creating much difference. (Note: I can not use datasource as database due to some more validations microflow I have to use, but for testing I am only using retrieve activity inside microflow.) Is there any way to reduce the time?  thanks in advance.
asked
4 answers
1

Hi Ankit,

You can try OQL query below is the OQL docs link

https://docs.mendix.com/refguide/oql/

answered
1

To understand the query's that will get sent by the Mendix-server to the database, set the log level of ConnectionBus_Retrieve and you will see messages like this in your logs:

image.png

 

Likely you are also already seeing messages about retrieving more objects than "set as the max for retrieval". Check the client's state by, in the browser (except Firefox in parallel), press Ctrl-Alt-g and check the console/log:

image.png

 

Also: make sure you do not retrieve anything more than you need. Only the attributes that you show in the datagrid. Nothing more. And do retrieve this as one object per line, so no structure. This will make your retrieve, result in only one object per line instead of possibly several per line. Check your browser's log, in the inspectory (F12) see the console for these messages:

image.png

And check the state of your session. See if there are too many

 

If, after all that, your response are still not ok, consider OQL, like others said. Do so by adding a microflow as a datasource and have that flow call the OQL. This will likely increase your query dramatically.

answered
0

Ankit,

If you are displaying 31,000 records in a browser, the lag you are seeing is likely due to the browser taking some time to render that numer of rows.  You could test this by having the microflow return a smaller number of rows (say 100) and see if the lag is still there.

 

Is there a reason that many rows are needed at one time?  You may want to revisit your user requirements and see if there is a way to return and/or display a smaller number of rows.

 

Hope that helps,

Mike

answered
0

Hi Ankit,

Considering your scenario.

Try to replace your database retrieve with OQL , i believe it will reduce your time for sure.

 

Best Regards

Sharad

 

answered