Home Forums WoodMart support forum Uncached pages slow response time – Response from my hosting provider Reply To: Uncached pages slow response time – Response from my hosting provider

#168933

Jeriss Cloud Center
Participant

Hi Artem,

The support team from WPML says the following :

This spl_autoloader hook is called by php when any class is instantiated. In plugins, we have a lot of classes, so this hook woodmart_autoload is called some 5,000 times during page load. It would be OK, but code of this hook in the main theme has an issue: on every call it checks if file_exists() in theme own directory. File operation is slow, and not needed.
My modification creates first list of all classes in woodmart theme directory (there are only 14 as I recall), and then checks if file_exists only for 14 files. In other (5000-14) calls function just simply and quickly does nothing.

Just to clarify, no action is expected on your side. However, I forward you this information because they indicate that this will include this code in WPML plugins, to improve their plugin’s performance specifically for those who have Woodmart theme.

Thanks