Dart's library system impedes code caching #13390
Labels
area-language
Dart language related items (some items might be better tracked at github.com/dart-lang/language).
closed-not-planned
Closed as we don't intend to take action on the reported issue
type-enhancement
A request for a change that isn't a bug
This issue was originally filed by Misko.H...@gmail.com
A typical way to do caching in JS world is to set the URL to be cached forever and to have the URL contain the version number of the source (such as timestamp or SHA). This agressive caching allows the browser to skip the URL fetch and hence improve performance. If the code needs to be updated the version/timestamp/SHA is changed which changes the URL and causes a new fetch and cache. This is an effective way to do caching.
Karma uses this to get its fast turnaround, by caching files aggressively and appending cache busting timestamp. Karma on dart can not perform this caching since there is no way to do cache busting.
In order to do cache busting it must be possible to change the import statement URLs to insert a cache busting token. Since import statements are spread all over the file system there is no central way to manage them and control cache expiry.
Compiling all dart code into single monolithic file (such as dart2dart) only makes this problem worse since if any portion of the codebase changes it is than required to re-download all of the code.
http://karma-runner.github.io/0.10/index.html
The text was updated successfully, but these errors were encountered: