kazu2012 / get-simple-cms

Automatically exported from code.google.com/p/get-simple-cms
GNU General Public License v3.0
0 stars 0 forks source link

What is the logic flow for plugin_functions.php #345

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am just curious what the flow is.

It seems these functions are called numerous times on front an back ends.

read_pluginsxml
create_pluginsxml
read_pluginsxml
create_pluginsxml
read_pluginsxml

This seems fishy considering the file io that goes on in these functions.

Also I don't think we need to be doing anything but loading enabled plugins.xml 
on front end, not checknig for new plugins or enabling them automatically.

How can we optimize this so we are not reading the same file over and over 
again per request or reading directories.

I think we can shave 100ms off requests on average by optimizing this.

Original issue reported on code.google.com by tablatronics on 24 Jul 2012 at 4:31

GoogleCodeExporter commented 9 years ago
Good find. 8) 

I've fixed the create_pluginsxml to only to call the second read_pluginsxml 
only when the number of plugins changes. 

There was also a second call to create_pluginsxml at line 89 that wasn't 
required. 

Original comment by MichaelS...@gmail.com on 25 Jul 2012 at 7:22

GoogleCodeExporter commented 9 years ago
This should be sorted now.

Original comment by MichaelS...@gmail.com on 10 Sep 2012 at 10:21