stable

Clone or download

Read-only

request #7067: fix performance issues while admin selectbox with lot of values

The issue comes from the fact that for each value we display in the administration of the element, we need to know if user can hide it or if she can delete it. Those two cases depends on semantic, workflow, usage, etc. The previous strategy was to execute two sql requests (containing lot of union statements) for each value. This is bad for performance because it doesn't scale well (it is linear): on my setup with a field containing 40 values, it took 6sec (~150ms * 40) to display the page. The new approach is the following: whenever we request the db to know if we can hide/delete a value I assume we will do the same request for the sibling value of the field. Therefore, instead of asking for one value, we ask for all values of the field, leveraging on MySQL index performances. The result is that it takes only 600ms to display the page with this changeset. Change-Id: Ic2358c0a2e27af06233a3bc9f952b744a290b275

Modified Files

Name
M plugins/tracker/include/Tracker/FormElement/dao/Tracker_FormElement_Field_List_Bind_Static_ValueDao.class.php +100 −67 Go to diff View file