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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

oxyc’s picture

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.

--
http://drupalcode.org/project/fivestar.git/commit/88f4303

Status: Fixed » Closed (fixed)

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