After extensive discussion with nnewton regarding #921210: Fix performance of "My issues" we found that probably the most effective way to optimize the "My issues" query is to conditionally make that view use tracker2's tables and columns. We go from a very heavy filesort query to something served entirely from the index. The first step towards making this a reality is at least exposing tracker2's tables and columns to views so that I can use those in project_issue. Patch coming soon, stay tuned.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dww’s picture

Status: Active » Needs review
FileSize
5.35 KB

First pass. This just gives you the basic tables and columns with views core's default handlers for everything.

I think we're going to need a couple of slightly fancy handlers for the equivalent of views core's "uid_touch" argument and filter, but that should be pretty easy.

However, that brings up the question of how you want the files laid out. Do you just want everything in the root, or do you want a "views" subdirectory for tracker2.views.inc and the handler .inc files?

dww’s picture

Added handlers for the "uid_touch" argument and filter. tracker2 just swaps out the default handlers from views core for this, since it can always do a better job than the core views handlers. Given that we've now got a collection of views-related files, moved things into a views subdir.

This is all we need for #921210: Fix performance of "My issues", so this is now ready for serious review. I'm happy to commit this (so CVS blame will point to me in case of any trouble down the road).

dww’s picture

By request from nnewton, now with a custom filter handler so that we end up with "tracker2_user.published = 1" instead of "tracker2_user.published <> 0" in the WHERE.

dww’s picture

Fixed the UID filter in a few important ways now that I'm actually testing all the other issue views. ;)

dww’s picture

Status: Needs review » Fixed

At drumm's suggestion, I went ahead and committed this. I committed #4 to HEAD, branched the views directory for DRUPAL-6--1, and committed the hunk for tracker2.module to DRUPAL-6--1.

If there are any followup issues about this views support, feel free to ping me about them. I'm not necessarily going to watch the queue and actively co-maintain this module now, but I'm totally happy to deal with any fallout from this change.

Cheers,
-Derek

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Dinis’s picture

Can someone point me to where the dev version is so that I may apply this patch?
The latest release version is 1.14.2.3 and this patch requires 1.14.2.7.

edit - Scrub that, found the latest Dev release with all the views code already added.

Many thanks,
Dani