Slow Page when more records to show

0
I have  a page which runs a microflow to populate the grid to show the records. initially it was fast but now the number of records retrieved is more than 1000 and users now have to wait few seconds to see the page. this is only going to get worse as more records are added, how to address this situation... i do have pagination enabeld so that only 20 records are shown on the page, but the retrieval happens for all records either way.  
asked
2 answers
1

Hi JP,

You indicate that retrieving/generating the list of objects you show to the user is consuming more and more time. So probably server side paging would help. Depending on the situation you can consider these solution directions.

  1. If you retrieve persistent data, consider switching to direct retrieval from database instead of a microflow retrieve. Then Mendix will take care of server side paging
  2. If you retrieve non-persistent data, consider using the System.Paging controls while generating them (see the answer on this question)
  3. If you retrieve non-persistent data and have to loop within a loop, consider using OQL module to write an efficient query.

Good luck!

Johan 

answered
0

Did you add a index to your Entity? It would speed up retrievals.

If you do not need all the 1000 records and the list is ordered, a custom pagination to retrieve only n records will do the trick

answered