Nested grid slow

Hi there,

I’m trying to figure out what causes this. I have a grid that has a nested grid linked by ID…for some reason, things are very snappy without the nested grid but as soon as I add the nested grid, everything is very slow, I’m not talking seconds,…it takes approx. 5 min for the application to open after adding the nested grid.

individually, the grid and the grid I put as nested grid run fast.

I tried deleting the application in app folder and rebuild…doesn’t make any difference. I wonder if anyone has come across this issue.

Thank you

How many fields, and how many with lookups you have in every grid? Think that every row of your main grid needs a “nested” query for each nested gri, and each lookup field, on “master” or nested, another query.

When you call your nested alone, it does a main query to retrieve records, and another query for each lookup field for each row, but this multiplies on nested. Probably this is the reason of speed.
BTW, wich PHP version are you using?

Hi Giu,

approximately 100 rows being passed to the nested grid…so I figure that wasn’t that many. I’m using php 5.6. Do you think it’s a problem with php?

Sorry, but didn’t asked about rows, but fields and lookups in each grid. And yes, PHP version is important because PHP 5.6 25% faster > PHP 5.4

Hi Giu, it’s 4 fields for each grids, and the lookup is matching one of the fields (ID field). Anyway, I managed to “fix” it. Instead of using the view, I create a table from the view and use the table instead. Now the nested grid works fast