Referring to
#1183398: Support Galleria 1.2.4 and future versions

Now that we have a clean glob based js library version, we should think about performance as a next step. Repeating my inputs from the fixed issue above:

Globbing is a pretty expensive operation.
The library version should be determined once and then reused without globbing on every site request.
Is there no standard from libraries to support such cases?

If no, we could use a variable and glob for the file only if the file is not found (according to the var) or var is empty.
(variable_set, variable_get)

In addition, here's a short explanation, why we even should avoid using file_exists on filesystem per pageload.
http://drupal.org/project/agrcache

So let's speedup! :-)

Comments

s_leu’s picture

Status: Active » Fixed

added the caching mechanism using variable_get/set. committed...

Status: Fixed » Closed (fixed)

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