4

i have spend many many hours to get wincache work, because my app in Symfony 2 is slow on my Windows 8 (initialisation time > 2s). Wincache solution founded here https://stackoverflow.com/a/9487264

IIS is installed and its in phpinfo(). But problem is that my application is still slow. I have tried to search what is wrong, and it looks like reroute.ini is not loaded at al, even if its in php.ini

wincache.rerouteini="C:\Program Files (x86)\iis express\PHP\v5.5\reroute.ini"

but its missing in phpinfo()

enter image description here

I even looked at the source code on pecl, and i found

#ifdef WINCACHE_TEST
/* index 21 */ STD_PHP_INI_ENTRY("wincache.rerouteini", NULL, PHP_INI_SYSTEM, OnUpdateString, rerouteini, zend_wincache_globals, wincache_globals)
/* index 22 */ STD_PHP_INI_ENTRY("wincache.olocaltest", "0", PHP_INI_SYSTEM, OnUpdateBool, olocaltest, zend_wincache_globals, wincache_globals)
#endif

Whats that? It means that this option is present only when constant WINCACHE_TEST is true? Because thats never, because i found this too

#ifdef WINCACHE_DEBUG
# define WINCACHE_TEST
# define _ASSERT(x)   if(!(x)) { dprintalways(#x); if(IsDebuggerPresent()) { DebugBreak(); } }
#else
# define _ASSERT(x)
#endif

And constant WINCACHE_DEBUG is commented out above in code

/* comment following line for release builds */
/* #define WINCACHE_DEBUG */
/* #define DEBUG_DUMP_OPARRAY */

Is this bug? I just want to get reroute.ini (http://www.php.net/manual/en/wincache.reroutes.php) work. Thats option that can decrease initialisation time 4x, please help what i have wrong there, or send me functional wincache extension here for PHP5.5 VC11 NTS version, thx!

Community
  • 1
  • 1
PayteR
  • 1,727
  • 1
  • 19
  • 35
  • What is your concrete programming question with this? *"Not working properly"* and *"Is this bug?"* aren't a sufficient problem description. Also asking for off-site resources like you do with *"end me functional wincache extension here for PHP5.5 VC11 NTS version, thx!"* at the end are off-topic. – hakre May 11 '14 at 10:31
  • Problem is that, there is absolutely no effect when its wincache installed without functional reroutes. Now i have initialisation time ~2s, it should be ~500ms. This should be done with optimised functions in reroutes.ini, but they are not loaded at all. – PayteR May 12 '14 at 11:30
  • Well, that's not a programming question. It's just that you assume faster results than you get in real life. That's however not per-se a sign of a problem, it might be just a problem that you expect wrong things. E.g. who says that it should be ~500ms? And why. Then check if your system supports that reason. – hakre May 12 '14 at 13:33
  • "E.g. who says that it should be ~500ms?" for example here http://stackoverflow.com/questions/7741043/php5-performance-comparison-windows-and-linux/9487264#9487264 – PayteR May 12 '14 at 15:04
  • Or for example when i tried ubuntu virtual box it was less than 500ms. Its all about IO functions like file_exists(), wincache should solve this with own internal functions, but reroutes are not even loaded. – PayteR May 12 '14 at 15:07
  • I do not think that *Strayer* actually had the chance to review *your* box and setup, so it's likely a generalization you do here. I say to you it should be ~4000ms and you got ~2000ms already. So now you're system is faster then it should be! (you can thank me later :)) – hakre May 12 '14 at 15:33
  • You've been running wincache on ubuntu? I hardly doubt that makes any sense as the extension is for windows. – hakre May 12 '14 at 15:34
  • @hakre ~2000ms i have already on xampp with only opcache, no wonder here... – PayteR May 13 '14 at 14:22
  • And i have it on Windows 8 of course, it is written in my post... – PayteR May 13 '14 at 14:24

2 Answers2

1

I had the same problem, so I asked on the WinCache forums and it turns out the function reroute function has been removed for a while, without them updating the documentation. Too bad.

vansante
  • 36
  • 2
0

Yes, the wincache.rerouteini setting was disabled very early on for app compat reasons.

However, in WinCache 1.3.7.1 a new form of reroute support has been added. It no longer takes a separate .ini file. Reroutes are on by default.

php 5.4: http://sourceforge.net/projects/wincache/files/development/wincache-1.3.7.1-dev-5.4-nts-vc9-x86.exe/download php 5.5: http://sourceforge.net/projects/wincache/files/development/wincache-1.3.7.1-dev-5.5-nts-vc11-x86.exe/download php 5.6: http://sourceforge.net/projects/wincache/files/development/wincache-1.3.7.1-dev-5.6-nts-vc11-x86.exe/download

This private wraps 10 PHP functions which can benefit from looking in the WinCache file cache first. The functions are:

  • file_exists
  • file_get_contents
  • filesize
  • readfile
  • is_writable
  • is_writeable (alias for is_writable)
  • is_readable
  • is_file
  • is_dir
  • realpath

Reroute/detour is on by default. If you do need to turn it off:

wincache.reroute_enabled=0

DropPhone
  • 396
  • 2
  • 9