Rendering of the filters in the popup view first sorts the list of filters using the built in sorting method. While this is fine for a small amount of filters, it may impact performance as more filters are added.
In order to improve performance as the application scales, sorting should only be done if the initially received filters are unsorted on intake from chrome's storage.
New insertions should be done so that the filters remain sorted.
This will make rendering of the popup run at O(n) rather than O(nlogn)
Rendering of the filters in the popup view first sorts the list of filters using the built in sorting method. While this is fine for a small amount of filters, it may impact performance as more filters are added.
In order to improve performance as the application scales, sorting should only be done if the initially received filters are unsorted on intake from chrome's storage.
New insertions should be done so that the filters remain sorted.
This will make rendering of the popup run at O(n) rather than O(nlogn)