Kdyby / Translation

Integration of Symfony/Translation into Nette Framework
https://packagist.org/packages/kdyby/translation
Other
89 stars 84 forks source link

Faster compiling of extension #99

Closed MartkCz closed 8 years ago

MartkCz commented 8 years ago

When I using only one loader, other loaders unnecessarily looking for resources.

Solution:

translation:
    loaders: [neon]

Enables only neon loader => compiling is ~10x faster than before.

Statistics: All loaders: ~ 2690 ms One loader: ~ 262 ms

fprochazka commented 8 years ago

That is pretty awesome!

fprochazka commented 8 years ago

Thank you!

Just an idea: do you think the whitelist could be generated automatically based on found resources? The container is doing compile-time resolution, so the default loaders might not be all of them, but only those that were needed during compilation.

If you have some more time, it would be great if you could prepare a PR for that :)

MartkCz commented 8 years ago

I hope I understand. I will take a look at it and will try to send PR.