I actually like having software and hardware that can be idle. I find it quite peculiar that some app/window/page I'm explicitly not interacting with should be doing work because I'm not interacting with it.
Show HN: Speed up your site by running JavaScript when the browser is idle
11–20 of 95 posts
Re: Show HN: Speed up your site by running JavaScript when the browser is idle
#12I have an idea: why not speed up your site by NOT running js at all?
ducks
Re: Show HN: Speed up your site by running JavaScript when the browser is idle
#13What I’d really like to see on this page is more descriptive text. Mainly a description of what’s actually being done by the library. But also a section on when I should use idle-task over Partytown - https://partytown.builder.io/
Re: Show HN: Speed up your site by running JavaScript when the browser is idle
#14Couldn’t this have negative impact on user battery life depending on the weight of the JS or number of open tabs with sites using it? Seems like it might be antagonistic to host OS efforts to to coalesce work and perform it while the CPU is already awake to reduce the number of wakeups and save power, since it specifically waits for browser idle.
Re: Show HN: Speed up your site by running JavaScript when the browser is idle
#15I have an idea: why not speed up your site by NOT running js at all?
Re: Show HN: Speed up your site by running JavaScript when the browser is idle
#16Re: Show HN: Speed up your site by running JavaScript when the browser is idle
#17I actually like having software and hardware that can be idle. I find it quite peculiar that some app/window/page I'm explicitly not interacting with should be doing work because I'm not interacting with it.
For example, you may schedule periodic API polling (and JSON response parsing) using this API to prioritise user input handling.
I would guess (but not know!) that the browser could de-prioritise these tasks even further when the browser decides to (such as when in the background).
Re: Show HN: Speed up your site by running JavaScript when the browser is idle
#18I have an idea: why not speed up your site by NOT running js at all?
Re: Show HN: Speed up your site by running JavaScript when the browser is idle
#19I actually like having software and hardware that can be idle. I find it quite peculiar that some app/window/page I'm explicitly not interacting with should be doing work because I'm not interacting with it.
Re: Show HN: Speed up your site by running JavaScript when the browser is idle
#20Earlier quoted context omitted.
requestIdleCallback isn’t something that you need to protect yourself from. It just executes a function when there’s nothing else happening on your page essentially.
You mean my browser still doesn't use enough CPU? I don't want sites that aren't in focus to do anything.