Category Object Speed Improvements - BETA

 Category objects (page filters) are a very commonly used feature within panintelligence dashboards.

 

However, we have noticed that they can have a significant impact on a page load times.  This is because at present all the data required is pre-loaded.  This also causes a significant impact on dashboard usage as object values are fetched when a filter is selected, and this causes a cascade effect to re-run multiple filters.  This is wasteful as we fetch data multiple times that may never the viewed by a user.

 

Consider the following scenario.

image-20240603-103537.png

 

 

The category has 5 category objects, When the dashboard first loads it has now run 5 queries and the data for each drop list is returned and held.

 

In the most likely scenarios, the user will select a value in each drop list in turn running top to bottom.  In this case we will have run

 

5 Queries

Then

4 Queries (to cascade the selection form the top drop list

Then 3…., Then 2 .., Then a final 1

 

So on a modest category with 5 filters, we had run 5+4+3+2+1 = 15 Queries. 

 

Then the user would only see all that data if they dropped down each list.  Actually, the most likely behaviour would be selecting a value in each drop list in turn.

 

 

It is now not uncommon for categories to now contain 10+ filters. (Now it is probably rare that a user would make a selection in each – but if they did that would end up at 55 queries run. 

 

The new method would now run each once.

 

We have changed this functionality (a Beta feature – so existing functionality is preserved until you wish to test).

 

Category objects now wait until they are requested before fetching (No longer pre-fetch). 

 

We have also taken this chance to optimise filter components.

 

There is a particular pain in the current solution with multi-pickers as they  are validated + cascaded after every selection.  This can be painful when a user wishes to pick multiple items.

Category objects no longer pre-fetch

 

When you load a category, even with a large number of category objects, the charts and filter panel will load quickly.  (There are some exceptions that you can manage – see Exceptions below)

 

When the user clicks on a category object, a small cog appears.  This indicates that the data is being fetched.

 

image-20240603-103625.png

A snack bar also appears in the bottom right of the screen to explain to the user that data is being fetched.

 

Exceptions – still require pre-fetch / cascade fetch

There are configurations that still require a prefetch of data.

When you configure a category object, if you have configured in a way which requires pre-fetch then an orange egg timer appears.

If you hover over an egg timer – you will see why it has appeared.

The exception scenarios are as follows;

 

  1. Category objects that always require a pre-fetch are.

 

Checkboxes, Images and Sliders.  All three of these types must select the data to allow the relevant Items to display. 

 

  1. Unticking can select All.

In this case, the data must be preloaded so that the dashboard knows what the first value to use is.

 Mitigation: Add a Default value

 

 

Now the system has a value to use without a fetch of data.

 

NOTE: This is a change of behaviour – we no longer validate and discard a non-matching default value.

 

  1. Using an index as a default value.

Again this requires us to fetch the data to find the value at the selected index

 

 

  1. A Checkboxes, Images and Slider, that are not excluded from a cascade.  In this circumstance a cascade filter is still required to re-validate the data.

 

The cancel and apply buttons are now always visible.

 

The cancel and Apply buttons, used to be below the view whn you had a large number of category objects (Either down the side or at the top).

 

Now they are always visible and the scroll bar lets you scroll on your category objects.

 

So the default view now looks like.

 

 

And when at the top of the screen

 

Enhancements to existing filter controls

 

Multi-picker

 

The multipicker component is now a pop-up, it is paginated for large lists, has a search bar, and allows multi-selection without exiting the component.

 

Date Range

 

The date range picker, is also now a pop-out component. 

 

We have added a fast date picker to allow the user to quickly select common date ranges.

You can still type or lookup dates using a date picker

 

Drop list

The drop list component, now contains a filter and is paginated for large data sets.

 

This allows it to be searchable over much larger sets of data.

 Admin Feedback

 

In our testing we noticed that we had to jump in and out of the category object build panel to understand behaviour.

 

We have added (visible to admins only) feedback on the category object panel.

 

On some category objects you will notice a small rectangle with text in it.  (an indicator)

Hovering over the text will show a tooltip.

 

 

V = variable, object or filter input.  i.e. the object used as the definer for this object contains either {{ }}, [[ ]] or #~ ~# replacement

EX = The object is excluded from a cascade so it will no re-fetch when filters above or ro the left are selected.  It will also not perfrom any cascade data fetches.

NF = No filter, it is be used and manually applied to charts and other filters. 

NOTE: you may see more than one indicator together.

 

These indicators are also visible in the Category Objects definition panel.