w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
PHP factor 30 performance difference from Linux to Windows

I took a look at that plugin on Github:

https://github.com/wp-plugins/wp-slimstat

And the offending file being included is a file that has been minified to some degree and really is data (not code), there are 5 variations each of which is about 400KB

There is also that maxmind.dat file that is 400KB, although I don't know if it uses both.

You are using an older version of the plugin, version 3.2.3 and there is a much newer one that may solve your problem.

Comparing the differences is hard because the author or whoever has not kept the git history in order, so I had to manually diff the file. Most of the changes related to _get_browser seem to be adding a cache.

It's possible loading that file is slow to parse, but I would expect PHP to be load both files at similar rates in both platforms granted that IO caching is working.

EDIT Looking a bit closer that might not solve your problem. Those files are basically large Regular Expression lookup tables. Did your Linux system have an APC cache on it and this one does not? The APC cache would probably keep the PHP file data cached (although not the compiled regex patterns)





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.