From 247878a7919c5e9b27638395d479939f9ad5d22e Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Mon, 18 Apr 2016 11:43:53 +0100 Subject: Cache content_scripts/vimium.css in chrome.storage.local. Previously, we had two different approaches. This seems like a simpler approach. We simply cache the Vimium CSS in chrome.storage.local (in the background page) and fetch it from there (in UI components). There is also a minor change in the we no longer cache the CSS in memory. This seems to be the right thing to do. Caching the CSS in memory consumes a small amount of memory. However, it can only speed up the fastest loads. It cannot speed up the first load -- which is likely the one that matters most. So caching the CSS in memory seems to make little sense. --- background_scripts/main.coffee | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'background_scripts') diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index 4aa2fc41..3e1cc0a3 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -129,14 +129,14 @@ helpDialogHtmlForCommand = (html, isAdvanced, bindings, description, showCommand html.push "