fivestar_fivestar_widgets() should cache the usage of file_scan_directory() not to call it multiple times on the same page load in case of several widgets.

#1 fivestar-cache_file_scan_directory-1399780-0.patch1.12 KBoxyc
PASSED: [[SimpleTest]]: [MySQL] 108 pass(es). View


oxyc’s picture

1.12 KB
PASSED: [[SimpleTest]]: [MySQL] 108 pass(es). View

A patch to implementing drupal_static to cache the $files variable. Haven't tested but I think this should work.

oxyc’s picture

Status: Active » Needs review
ericduran’s picture

Yea, I haven't tested this neither but it looks good to me.

ericduran’s picture

Status: Needs review » Fixed

Thanks for this.

I committed this patch. I also made sure to use git am since you had a properly formatted patch and so you can get credit.

So yay for your First Drupal commit :) (or at least the 1st one that should be visible in your profile page).

Thanks again.


Status: Fixed » Closed (fixed)

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