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

Simplify service worker caching #634

Closed
humphd opened this issue Mar 8, 2017 · 1 comment
Closed

Simplify service worker caching #634

humphd opened this issue Mar 8, 2017 · 1 comment

Comments

@humphd
Copy link

humphd commented Mar 8, 2017

In #547 we added service worker caching for all static resources, so that Brackets can load faster and without network. One of the things we did was to include a list of file patterns to be cached, see https://github.com/mozilla/brackets/blob/master/sw-cache-file-list.json. This is a bad idea, because people forget (or don't know) to update it when we add/remove files.

In the work I did to update to the latest upstream code, our dist/ folder got much slimmer. We no longer include so much crap, and we should consider moving over to having the service worker cache everything in dist/**.

The only thing we might be able to clean up a bit is dist/thirdparth/CodeMirror/*. One approach would be to move to a distributable version vs. an exploded source version of CodeMirror (which would break from upstream, but is probably smart)--CodeMirror has scripts we could run in src/thirdparty/CodeMirror/bin/*. Alternatively we could just delete (or not copy to dist/) things we don't need.

@humphd
Copy link
Author

humphd commented Mar 8, 2017

screen shot 2017-03-08 at 2 08 28 pm

Interestingly we don't actually load that much from thirdparty/CodeMirror/*, mostly just the modes, code folding addon, and CSS.

humphd added a commit to humphd/brackets that referenced this issue Mar 8, 2017
humphd added a commit to humphd/brackets that referenced this issue Mar 13, 2017
humphd added a commit that referenced this issue Mar 14, 2017
…rt of #634 (#636)

* Streamline how we build CodeMirror in dist/ so things get bundled, part of #634

* Add back copy.thirdparty task, but just for less.min.js

* Add back src/thirdparty/CodeMirror copy task on install
humphd added a commit to humphd/brackets that referenced this issue Apr 3, 2017
humphd added a commit that referenced this issue Apr 6, 2017
…dist/, part of #634 (#637)

* Rework extension loading to use a json file, drop ?enableExtensions support

* Close, but no cigar

* Working, all extensions built with requirejs, copied as small as possible

* Revert change to swPrecache I removed for debugging

* Don't copy unused SourceCodePro fonts to dist/styles/fonts
humphd added a commit to humphd/brackets that referenced this issue Apr 6, 2017
@humphd humphd closed this as completed in d2ce549 Apr 7, 2017
timmoy pushed a commit to timmoy/brackets that referenced this issue Apr 19, 2017
…dist/, part of mozilla#634 (mozilla#637)

* Rework extension loading to use a json file, drop ?enableExtensions support

* Close, but no cigar

* Working, all extensions built with requirejs, copied as small as possible

* Revert change to swPrecache I removed for debugging

* Don't copy unused SourceCodePro fonts to dist/styles/fonts
timmoy pushed a commit to timmoy/brackets that referenced this issue Apr 19, 2017
* Fix mozilla#634: simplify service worker caching

* Rework staticFileGlobs to ignore dist/nls, add runtimeCaching for nls, fonts

* Fix review issues, rework ?disableExtensions logic

* Compress dist/ and bramble-sw.js, call uglify after build-extensions
timmoy pushed a commit to timmoy/brackets that referenced this issue Apr 20, 2017
…dist/, part of mozilla#634 (mozilla#637)

* Rework extension loading to use a json file, drop ?enableExtensions support

* Close, but no cigar

* Working, all extensions built with requirejs, copied as small as possible

* Revert change to swPrecache I removed for debugging

* Don't copy unused SourceCodePro fonts to dist/styles/fonts
timmoy pushed a commit to timmoy/brackets that referenced this issue Apr 20, 2017
* Fix mozilla#634: simplify service worker caching

* Rework staticFileGlobs to ignore dist/nls, add runtimeCaching for nls, fonts

* Fix review issues, rework ?disableExtensions logic

* Compress dist/ and bramble-sw.js, call uglify after build-extensions
Rajat-dhyani pushed a commit to Rajat-dhyani/brackets that referenced this issue Apr 20, 2017
…dist/, part of mozilla#634 (mozilla#637)

* Rework extension loading to use a json file, drop ?enableExtensions support

* Close, but no cigar

* Working, all extensions built with requirejs, copied as small as possible

* Revert change to swPrecache I removed for debugging

* Don't copy unused SourceCodePro fonts to dist/styles/fonts
Rajat-dhyani pushed a commit to Rajat-dhyani/brackets that referenced this issue Apr 20, 2017
* Fix mozilla#634: simplify service worker caching

* Rework staticFileGlobs to ignore dist/nls, add runtimeCaching for nls, fonts

* Fix review issues, rework ?disableExtensions logic

* Compress dist/ and bramble-sw.js, call uglify after build-extensions
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