Giter VIP home page Giter VIP logo

Comments (7)

dstogov avatar dstogov commented on July 20, 2024

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.

ricardclau avatar ricardclau commented on July 20, 2024

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.

dstogov avatar dstogov commented on July 20, 2024

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=1

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?

No. It may speedup or slowdown not only the first request, but every
request, because those functions are executed at run-time.

from zendoptimizerplus.

ricardclau avatar ricardclau commented on July 20, 2024

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=1

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?

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.

dstogov avatar dstogov commented on July 20, 2024

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 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]<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=1

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?

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.

ricardclau avatar ricardclau commented on July 20, 2024

Restarting Apache does not reset Zend Optimizer+? If not, how can this cache be restarted?

from zendoptimizerplus.

dstogov avatar dstogov commented on July 20, 2024

Of course, it resets O+.

from zendoptimizerplus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.