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.

CommentFileSizeAuthor
clean-up-homebox.patch3.12 KBJosh Waihi
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pheraph’s picture

Could 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

kscheirer’s picture

Status: Needs review » Reviewed & tested by the community

Patch 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 :)

Josh Waihi’s picture

I agree, its not really performance benchmark worth. it is afterall just an admin page. Nevertheless it is tidy code and easy to understand IMO.

jchatard’s picture

Hi guys,

As soon as I succeed CVS login again, I'll review and commit this patch.

Thanks for the great work!
Jérémy

jchatard’s picture

Status: Reviewed & tested by the community » Fixed

Fixed in 1.3!

Status: Fixed » Closed (fixed)

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