4 ms·
One thing that comes to mind is to do all the actual loading of assets (HTML, CSS, images, JS, etc) but don't decompress/run anything. That way it can be done
by daeken 14y ago
One thing that comes to mind is to do all the actual loading of assets (HTML, CSS, images, JS, etc) but don't decompress/run anything. That way it can be done 100% in the background and then spin up quickly without having to hit the network once a tab is clicked.
Might have to look into trying something like that out; I work on Gecko, but in totally different parts of the code, so it'd be a fun little experiment if nothing else.
- agumonkey 14y agoResource prefetch would be good. I don't even know if it's possible for applications to throttle cpu/thread usage.
- illumen 14y agoThreads and processes can be given a lower priority. Edit for @barrkel: you can also do more advanced resource shaping on some OSen. Like limiting the number of network connections per second, and limiting the bandwidth. There are also cpu throttling possibilities where you can make sure a process only runs max 10% of cpu. Or as you say, putting scheduling into the app is another possibility.
- barrkel 14y agoLower priority does nothing to throttle activity unless there is a higher priority thread available to run; if the machine is otherwise idle, lowest priority threads will use 100% of CPU resources. If you want to avoid high CPU graphs, whirring fans from increased heat, etc., you need to make the thread or process sleep occasionally. For a thread, that's best done with explicit coding; for a process that isn't sharing resources with other processes, you can get away with more invasive freezing from the outside.
- agumonkey 14y agoI guess it's possible to code a tiny arbiter that will wake 'background' thread every few ms.