-
-
Notifications
You must be signed in to change notification settings - Fork 542
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
Update core.js limit localstorage writes to only essential ones #2180
Conversation
currently we are writing on every page load, and its my fault :(
hi! @raszpl this renews localStorage, if it was lost and makes the feature work again the next time. (So it need not be before improvedTube.init() either.
(Either way the feature can run async.) btw, loading the storage object could be faster youtube/js&css/extension/core.js Lines 304 to 325 in 87aa7e4
|
I know, I wrote this code :P c725cfd
are you commenting on some internal version or is this a wishlist? :)
I mean, sure
do we really need to pollute html tag with whole config Lines 14 to 39 in 65bfc33
|
yes❤️. One day another reader might join us.
missed the word "could"
convenient/special, because it works before the DOM is loaded. Could start with the many appearance & cleaning features (compare UnHook for YouTube)
could of course pre-process well
*Can use message for both, bi-directionally. So the feature runs async. |
but does anything use it? :) So I decided to check. There is this:
Thats all for js code, rest are pure CSS uses:
Thats all extension ever uses, so we can go:
thats how it was done previously, messages were too slow |
correction, I forgot CSS is in multiple small files, there is more used by CSS. Whole list: |
well, would you look at that, fished out a bug!
fix: #2196 youtube/js&css/extension/init.js Line 6 in 925baa8
so it will never be matched here when loading settings, can remove it from my list :) Wonder if any other items on a list are also like that. With #2197 and my extension config during chrome.storage.local.get the only Attribute injected to HTML tag is theme, much less pollution and less blocking. |
ok, so I tried really hard to make injection from /extension/core work, but it looks like chrome.storage.local.get timing fluctuates, around 50% of the time it runs really fast, other times it returns good 800ms after DOMContentLoaded
cant make it work reliably without localstorage :( |
hi! @raszpl
wasn't it our storage-loaded that was slow?
i think it rate limits us while testing "too quickly ( /also one trigger for #1803) (
(if |
currently we are writing on every page load, and its my fault :(