Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bypass cache for exposed routes in debug mode makes things very slow. Make it configurable? #389

Open
timwsuqld opened this issue May 11, 2020 · 0 comments

Comments

@timwsuqld
Copy link

We recently upgraded to the latest FOSJsRouting bundle and suddenly our page loads started hitting 13s per load when developing. Turns out dcfde60 (#362) means that every page load now ignores the cache and so it has to generate a new routes file every page load.

I understand that while testing routing specifically you probably want this, but when you have lots of routes/controllers this makes debug mode useless.

My understanding of ConfigCache is that we should be able to get it to trigger a rebuild when routes have changed? This means we don't need the debug to invalidate the cache for every page load.

Alternatively, it would be good if you could set the debug parameter for the fosjsrouting bundle instead of just taking the kernel debug status (maybe take the kernel debug status as the default). This way we could have debug turned off when we know we don't need to refresh the js routes every page load.

Yes, I understand we can just dump the routes and load a static file, but when developing it makes more sense to load it from the controller and have ConfigCache invalidate the cache as required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant