"Show Items" Performance Issue

bkim

Member
I have a view that is referencing two tables by a simple left join and 18 columns that takes about 2 seconds to build the table.
I have another view that is referencing two tables, has an expensive subquery, and has 18 columns yet takes 1.5 seconds to build the table.
I have another view that is referencing one table but has 31 columns with formulas that takes less than a second to load.

All queries load in less than 50ms. Do you know what may be causing the first table in dadabik to load so slowly? At first I thought that it might just be the time required to build the webpage, but it didn't make sense that a table that has even more columns (31) loads faster than one that has 18 columns.

EDIT: One thing I forgot to mention is that the first view has the least amount of rows being returned, but they each have a minimum of 20 rows being returned and the # of items being shown per page is 20.
 

bkim

Member
After looking more into this every now and then, I've come to the conclusion that the select_single columns are what is causing the table to load so slowly. Normally, this would be a non issue if I only had 1-2 select_single columns, but I have several tables that use 9+ select_single columns (and each one adds 200-250ms of load time) and the time to load the tables went from around 700ms to 3-4 seconds. Technically the time to load the webpage isn't that slow still, but its just on the border where some of our employees are complaining.

I'm looking for the code where the table gets formed and see if I can tinker with it, but I'm having trouble locating the specific part that forms the table. I'm assuming its under business_logic.php under the function build_form? I've been going through the function searching select_single to find the related portion and renaming it to something else to cause the html table to break, but I'm yet to find it. Can you help me pin point where I could find the specific code for select_single?
 

eugenio

Administrator
Staff member
Hello,
you are right, the more select_single/multiple you have, the higher will be the computation time. Performances are also affected by the number of fields you have.

The DaDaBIK engine has been optimized and next version (7) will be much faster. The function that produce the results table is build_results_table()
 
Top