Comments (6)
that's odd, will try to reproduce. typically the only thing yasd does that could be considered cpu intensive is when you upload a custom image as a thumbnail, it resizes the image. but that would only be a transient spike (happens in milliseconds) not continuous. what version of chrome and yasd are you running exactly?
from yet-another-speed-dial.
Here's a screenshot, showing typical behaviour (its CPU usage seems to cycle up and down every few seconds)
I'm using M$ Edgium 84.0.522.5 (Official build) dev (64-bit) (latest dev version); latest version of YASD from the Chrome Web Store. Identical behaviour observed in old Ungoogled Chromium v70, and in an older build of Edgium from a few weeks ago, when I first tried the extension.
from yet-another-speed-dial.
got it. should only occur when the tab is in focus, right? background tab usage goes to 0?
it's likely result of the animation ticker. this allows the speed dials to animate smoothly when certain events occur, like resizing the window or dragging a tile. it runs on spare cpu cycles so shouldn't be considered expensive, but it keeps everything a buttery 60fps.
Technical explanation:
"The ticker is driven by requestAnimationFrame events in modern browsers so that the updates are perfectly synchronized with the browser's rendering cycle. It also means that when the user switches to a different tab in the browser, the ticker's updates get throttled back significantly in order to conserve battery power and reduce load on the CPU (this happens because the browser itself throttles back requestAnimationFrame event dispatching). Typically requestAnimationFrame events occur around 60 times per second, but that's up to the browser and depends on system performance as well. If requestAnimationFrame isn't supported, the ticker automatically falls back to using a regular setTimeout() loop which is supported in all browsers."
hope that answers your questions. the relevant piece of code is the animate function in index.js. cheers
from yet-another-speed-dial.
just noting for posterity: actual cpu usage on my test system with an active yasd tab open is < 1%
from yet-another-speed-dial.
Toolbar Dial has 0% CPU usage in the browser task manager whether focused or unfocused - it's a similar extension with a few more features; perhaps the code might provide some ideas? I tested YASD again, it was 0% as long as not in focus. As soon as a YASD tab was in focus, in-browser task manager reported CPU jumping between 9%-14% (NB this does not translate directly to real Task Manager CPU usage; browser task manager seems to apply a scaling factor, perhaps as a percentage of the CPU used by the browser?)
from yet-another-speed-dial.
replaced the ticker with more efficient code in 16f005a
the usage will never be truly 0 because YASD animates the dials on window resizing; so it has to know when such resizing occurs. but the cost is very low
from yet-another-speed-dial.
Related Issues (20)
- Feature request: option to set font size for labels
- Importing exporting speed dial dont work anymore
- Support for android FF v. 120.1.1 HOT 1
- Book-marks do not retire with express of panel
- Does not edit heading
- Feature request: Pull favicons to use as image HOT 1
- Wallpaper does not seem to fill screen, but is cropped HOT 1
- [Feature Request] Option to use Opera Speed Dial API to fetch speed dial thumbnail images HOT 1
- No update on Firefox?
- YASD opens blank - SD's are in bookmarks manager HOT 2
- Delete this issue HOT 1
- json file exported by Opera "bookmarks to json"
- Feature request: support for sub-folders HOT 1
- Feature request : sort by name asc/desc HOT 4
- Feature request: Check for existing links
- Unable to import YASD or bookmarks HOT 2
- feature request: background images fit to screen size
- Latest version of Chrome doesn't allow for reordering links. HOT 1
- feature request: option to move 1st row of dials from center of page to top of page
- Custom thumbnails gif support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yet-another-speed-dial.