Comments (7)
hi Ricard,
Thank you for the post and good bechmarks :)
I've never worked with Symphony myself, but already got few reports, that it doesn't work properly with save_comments=0. This option disables saving/loading doc_coments that used in Symphony for some purpose.
enable_file_override=1 may make speedup or slowdown dependent on application. It speedups file_exists(), is_file() and is_readable() for files cached by O+, but makes them a bit slower for the others.
Thanks. Dmitry.
from zendoptimizerplus.
Hi Dimitry
Well, Symfony2 uses annotations /comments as one of the ways you can configure your application. There is a CLI command that converts these annotations / comments into plain PHP and of course with save_comments = 0, this just does not work as it is perfectly explained in your documentation. However, once the cache is warmed up, Symfony2 works perfectly :)
Regarding enable_file_override... well it might slow down the first request, but not the subsequents right? Symfony2 uses a lot of files and it may slow down autoload the first time, but not the following ones if I understand properly what you mean. Weird indeed! Any other guesses about what might be slowing down the HTTP responses?
from zendoptimizerplus.
Well, Symfony2 uses annotations /comments as one of the ways you can
configure your application. There is a CLI command that converts these
annotations / comments into plain PHP and of course with save_comments = 0,
this just does not work as it is perfectly explained in your documentation.
However, once the cache is warmed up, Symfony2 works perfectly :)I didn't get how you may change save_comments to 0 after warming the cache.
You probably work with save_comments=1Regarding enable_file_override... well it might slow down the first
request, but not the subsequents right? Symfony2 uses a lot of files and it
may slow down autoload the first time, but not the following ones if I
understand properly what you mean. Weird indeed! Any other guesses about
what might be slowing down the HTTP responses?
No. It may speedup or slowdown not only the first request, but every
request, because those functions are executed at run-time.
from zendoptimizerplus.
Sorry I may have not explained myself properly about how Symfony deals with annotations and how I did the test. What I did was to set save_comments to 1, warm the cache (annotations are read) set save_comments back to 0, reload apache config and execute ab (once the cache is warm, Symfony does not read annotations any more). So for HTTP requests save_comments was set to 0
But what might explain performance decrease is what you say about enable_file_override, specially if it happens at run time as you mention
Thanks for clarifying all this stuff
El 15/03/2013, a les 21:56, Dmitry Stogov [email protected] va escriure:
Well, Symfony2 uses annotations /comments as one of the ways you can
configure your application. There is a CLI command that converts these
annotations / comments into plain PHP and of course with save_comments = 0,
this just does not work as it is perfectly explained in your documentation.
However, once the cache is warmed up, Symfony2 works perfectly :)I didn't get how you may change save_comments to 0 after warming the cache.
You probably work with save_comments=1Regarding enable_file_override... well it might slow down the first
request, but not the subsequents right? Symfony2 uses a lot of files and it
may slow down autoload the first time, but not the following ones if I
understand properly what you mean. Weird indeed! Any other guesses about
what might be slowing down the HTTP responses?No. It may speedup or slowdown not only the first request, but every
request, because those functions are executed at run-time.
—
Reply to this email directly or view it on GitHub.
from zendoptimizerplus.
In case files were already saved with doc comments, the save_comments value
doesn't matter.
It's possible to disable comments loading (load_comments=0), but it would
break Symphony.
Anyway, save/load_comments are not suitable optimization a for Symphony.
Dmitry.
On Saturday, March 16, 2013, Ricard Clau wrote:
Sorry I may have not explained myself properly about how Symfony deals
with annotations and how I did the test. What I did was to set
save_comments to 1, warm the cache (annotations are read) set save_comments
back to 0, reload apache config and execute ab (once the cache is warm,
Symfony does not read annotations any more). So for HTTP requests
save_comments was set to 0But what might explain performance decrease is what you say about
enable_file_override, specially if it happens at run time as you mentionThanks for clarifying all this stuff
El 15/03/2013, a les 21:56, Dmitry Stogov <[email protected]<javascript:_e({}, 'cvml', '[email protected]');>>
va escriure:Well, Symfony2 uses annotations /comments as one of the ways you can
configure your application. There is a CLI command that converts these
annotations / comments into plain PHP and of course with save_comments
= 0,
this just does not work as it is perfectly explained in your
documentation.
However, once the cache is warmed up, Symfony2 works perfectly :)I didn't get how you may change save_comments to 0 after warming the
cache.
You probably work with save_comments=1Regarding enable_file_override... well it might slow down the first
request, but not the subsequents right? Symfony2 uses a lot of files
and it
may slow down autoload the first time, but not the following ones if I
understand properly what you mean. Weird indeed! Any other guesses
about
what might be slowing down the HTTP responses?No. It may speedup or slowdown not only the first request, but every
request, because those functions are executed at run-time.
—
Reply to this email directly or view it on GitHub.—
Reply to this email directly or view it on GitHubhttps://github.com/zend-dev/ZendOptimizerPlus/issues/64#issuecomment-14995950
.
from zendoptimizerplus.
Restarting Apache does not reset Zend Optimizer+? If not, how can this cache be restarted?
from zendoptimizerplus.
Of course, it resets O+.
from zendoptimizerplus.
Related Issues (20)
- Failed to compile on PHP 5.6 HOT 3
- Opcache crashed with PHP7 HOT 6
- current_wasted_percentage > max, restart_pending=1 but no restart HOT 4
- Error for make HOT 3
- No support for mod-itk? HOT 3
- the same cached and misses files bug HOT 11
- E_WARNING: Cannot modify header information - headers already sent by
- opcache_enabled automatically turns false HOT 2
- pfsockopen - when using opcache ,pfsockopen returns empty when server initiative to disconnect the current connection HOT 1
- 2 different files required w/ same relative path resolve to one file HOT 1
- Don't 7.0.5 work on PHP 5.4.45 ?
- OpCache Constantly Restarting Itself
- Php 7.0.19 call to undefined function exception despite defined
- Frequent PHP errors
- PHP 5.2 with OPcache and ZendOptimizer v.3.3
- Using opcache in command line HOT 1
- Feature request: opcache_evict HOT 1
- How to serialize op_array ?
- Opcache optimisation
- zend_compile_file use of uninitialized memory on second request HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zendoptimizerplus.