symfony/AsseticBundle — Issue #68: Improve speed in dev/debug env
Author: arnaud-lb
Created: 2012-02-22 21:04:06+00:00
State: open

With multiple assetic-managed assets on a page, assets can easily take several seconds to load in a dev/debug environment, since each asset is served by a symfony controller in dev/debug mode. Also, the loading of assets can't be done in parallel because of session locking.

This can take more than 10 or 20 seconds when using assets that have several leaves.

I think this could be improved in the following way:

- the controller could dump the assets to disk at the same time it serves them, so that the assets are served directly by the web server on the next page load
- the filename could be based on the asset's timestamp, so that once the asset is changed, its url is changed, and the asset is served from the controller again
- alternatively, the bundle could remove the outdated assets from disk on page load

Did someone tried something like this already ?