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.
While trying to debug some stuff I found this funciton was rather inefficient so I've re-written it to make it easier to understand and use a lot less SQL queries, that way the page should load faster too.
Comment | File | Size | Author |
---|---|---|---|
clean-up-homebox.patch | 3.12 KB | Josh Waihi | |
Comments
Comment #1
pheraph CreditAttribution: pheraph commentedCould you measure the speed gain (through the devel-module)? And how heavy did you test your patch? Basically I'm very interested in reducing the amount of SQL-queries, but I don't want to change it into instability or something like that.
Anyway, thanks for your effort!
Raphael
Comment #2
kscheirerPatch worked out fine for me, and the code style is clean.
The patch converts 4 SQL queries into 1 - the data being returned is the same, however. I don't think there is a need for performance statistics - it's definitely faster, and easier to maintain as well :)
Comment #3
Josh Waihi CreditAttribution: Josh Waihi commentedI agree, its not really performance benchmark worth. it is afterall just an admin page. Nevertheless it is tidy code and easy to understand IMO.
Comment #4
jchatard CreditAttribution: jchatard commentedHi guys,
As soon as I succeed CVS login again, I'll review and commit this patch.
Thanks for the great work!
Jérémy
Comment #5
jchatard CreditAttribution: jchatard commentedFixed in 1.3!