With reference to the blog post of optimization and the attached comments as well as the discussion here i think there is a need to go over the issue of numbers in filters and categories again.
As I see it in the moment, we have to ways of counting.
1) The extensive counting, which takes everything in consideration like expired records, private records etc -- depending on the visiting user, computed on the record properties.
2) Fast counting to take all existing records per condition.
Following the 2 upper discussions, the counting in the filter links is based on method 2, while counting on categories is based on method 1).
I would suggest to add a counting for categories also based on condition 2) since i believe it depends on the case of the application.
I made some test with a section , having 53K records and 20 categories. for these tests, i used the display without records.
Including the existing category numbering it takes ~1.747 sec, excluding the numbering it takes ~1.145 sec. I modified the category count now with Method 2 and the same result including numbers could be achieved in ~1.165 sec. Actually the counting for the 20 categories takes only 0.02 sec. For me 1.1 against 1.7 is a big change.
Maybe adding the "fast count" to the category template would be a good idea.
But i also realized, that just the category display without records in the list (Parameter "Show records at section homepage" = "Do not show anything") is slower than a category with low number of records (< 1K) ... This shows that there is still quite some room for improvement.
With reference to the blog post of optimization and the attached comments as well as the discussion here i think there is a need to go over the issue of numbers in filters and categories again.
As I see it in the moment, we have to ways of counting.
1) The extensive counting, which takes everything in consideration like expired records, private records etc -- depending on the visiting user, computed on the record properties.
2) Fast counting to take all existing records per condition.
Following the 2 upper discussions, the counting in the filter links is based on method 2, while counting on categories is based on method 1).
I would suggest to add a counting for categories also based on condition 2) since i believe it depends on the case of the application.
I made some test with a section , having 53K records and 20 categories. for these tests, i used the display without records.
Including the existing category numbering it takes ~1.747 sec, excluding the numbering it takes ~1.145 sec. I modified the category count now with Method 2 and the same result including numbers could be achieved in ~1.165 sec. Actually the counting for the 20 categories takes only 0.02 sec. For me 1.1 against 1.7 is a big change.
Maybe adding the "fast count" to the category template would be a good idea.
But i also realized, that just the category display without records in the list (Parameter "Show records at section homepage" = "Do not show anything") is slower than a category with low number of records (< 1K) ... This shows that there is still quite some room for improvement.