f4e689721a
Previously, when a cache was invalidated and every tab/iframe issued a getStyles request, we previous needlessly accessed IndexedDB for each of these requests. It happened because 1) the global cachedStyles was created only at the end of the async DB-reading, 2) and each style record is retrieved asynchronously so the single threaded JS engine interleaved all these operations. It could easily span a few seconds when many tabs are open and you have like 100 styles. Now, in getStyles: all requests issued while cachedStyles is being populated are queued and invoked at the end. Now, in filterStyles: all requests are cached using the request's options combined in a string as a key. It also helps on each navigation because we monitor page loading process at different stages: before, when committed, history traversal, requesting applicable styles by a content script. Icon badge update also may issue a copy of the just issued request by one of the navigation listeners. Now, the caches are invalidated smartly: style add/update/delete/toggle only purges filtering cache, and modifies style cache in-place without re-reading the entire IndexedDB. Now, code:false mode for manage page that only needs style meta. It reduces the transferred message size 10-100 times thus reducing the overhead caused by to internal JSON-fication in the extensions API. Also fast&direct getStylesSafe for own pages; code cosmetics |
||
---|---|---|
_locales | ||
backup | ||
beautify | ||
codemirror | ||
codemirror-overwrites/addon/lint | ||
csslint | ||
options | ||
.editorconfig | ||
.eslintignore | ||
.eslintrc | ||
.gitignore | ||
16.png | ||
16w.png | ||
16x.png | ||
19.png | ||
19w.png | ||
19x.png | ||
32.png | ||
32w.png | ||
32x.png | ||
38.png | ||
38w.png | ||
38x.png | ||
48.png | ||
128.png | ||
apply.js | ||
background.js | ||
COPYING | ||
edit.html | ||
edit.js | ||
fill_locale_placeholders.py | ||
health.js | ||
help.png | ||
install.js | ||
localization.js | ||
manage.html | ||
manage.js | ||
manifest.json | ||
messaging.js | ||
openOptions.js | ||
popup.css | ||
popup.html | ||
popup.js | ||
pull_locales.rb | ||
pull_locales.sh | ||
README.md | ||
storage-websql.js | ||
storage.js | ||
update.js | ||
world_go.png |
Stylus : Stylish fork for Chrome and Chrome-like things
Releases
Screen shot
Help
See the help docs or ask in userstyles.org forum. For Stylus specific questions and suggestions please use review section of the FAQs page.
Contributing
The source is hosted on GitHub and pull requests are welcome.
You can help us translate the extension on Transifex. When messages.json
file is ready to be merged, please open a new bug report in stylish-chrome/issues.
License
For copyright status of the "codemirror" directory, see codemirror/LICENSE. Everything else is:
Copyright (C) 2005-2014 Jason Barnabe jason.barnabe@gmail.com
Copyright (C) 2017 Stylus Team
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.