Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#4 | 928110-4.tracker2_views.patch | 9.55 KB | dww |
#3 | 928110-3.tracker2_views.patch | 9.66 KB | dww |
#2 | 928110-2.tracker2_views.patch | 8.51 KB | dww |
#1 | 928110-1.tracker2_views.patch | 5.35 KB | dww |
Comments
Comment #1
dwwFirst 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?
Comment #2
dwwAdded 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).
Comment #3
dwwBy 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.
Comment #4
dwwFixed the UID filter in a few important ways now that I'm actually testing all the other issue views. ;)
Comment #5
dwwAt 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
Comment #7
Dinis CreditAttribution: Dinis commentedCan 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