Needs work
Project:
Views Optimized
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Jun 2011 at 23:21 UTC
Updated:
11 Jun 2011 at 20:57 UTC
Jump to comment: Most recent file
Right now I have return; in views_optimized_views_pre_execute() commented out; in regards to the pager. I think hook_views_optimized_view_optimize could return something that controls if we want to force this to run even if the pager isn't used .
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | views_optimized-pager-1185260-1.patch | 1.17 KB | mikeytown2 |
Comments
Comment #1
mikeytown2 commentedComment #2
fabianx commentedHi,
Thanks for the patch. While I like the approach, I think we can do better.
I think the following things should be done here:
* return an array with information
** which also includes the functions to call for _get_orderby, _get_fields, which removes the redundant checks in the hooks.
In that information array have the level of optimization set (all queries, only with pager, etc.) with the maximum winning, and also allow modules to override the default of 1000 rows as there may be queries, which can be optimized and be faster even with 10000 rows or more.
This could look like:
Thoughts? Would that API work and be flexible enough?
Best Wishes,
Fabian
Comment #3
mikeytown2 commentedWhy call another set of functions? Have this all in one hook, and pass back the field and order by info. Also different views displays can have different filters, so adding a secondary filter on
$view->current_displayin the examples might be a good idea.