bitExpert/disco

It seems that Disco has performance issues

kocsismate opened this issue · 2 comments

Hey Stephan,

In my container benchmark, Disco seems to extremely underperform in tests where autoloading and startup times are also counted (https://rawgit.com/kocsismate/php-di-container-benchmarks/master/var/benchmark.html)

Could you please tell me why it happens? Once, I saw a compiled Disco container in my "/tmp" directory and I have a feeling that it is generated run-time. Can you confirm it? If this is the case, why it doesn't happen build-time (as a separate step)? I saw in the readme that Disco's startup time can be slow but if my benchmark is correct, unfortunately this is way much than slow.

By default Disco does not use caching for the generated code, that is quite likely why the performance dropped so badly. Will try to send you PR to fix this issue.

OK, cool! I am looking forward to it!