11 ms·
Making tab switching faster in Firefox with tab warming
- whatshisface 9y agoThis reminds me of that javascript technique where you load a page as soon as you detect a mouseover on the link. http://instantclick.io/ http://instantclick.io/ (try their documentation page for a demo of link-clicking)
- mehrdadn 9y agoVery cool. Do you know if it behaves correctly with caching (e.g. Forward/Back buttons)? Generally speaking, Javascript modifications to a page cause inconsistencies with what the user sees when Back is pressed (and it seems impossible to avoid this?), so I'm wondering if this is a caveat here as well.
- whatshisface 9y agoFor a while it has been possible to manipulate browser history with pushstate and popstate, including the URL that shows in the address bar. I believe that for a while now it has been possible to fully imitate a conventional website on a single "page." (A while ago, I worked on doing this on a job where we had to keep a websocket open at all times.)
- deleted 9y ago[deleted]
- geowwy 9y agoI use Turbolinks on some smaller projects and it works fine. Doesn't break the back button or anything. (Turbolinks is similar to Instantclick but without pre-fetching on hover.)
- hoppelhase 9y agoI thought Chrome already does this natively. At least in the Google search results I think.
- Nrbelex 9y agoNeat. This technique seems to be based on hovering over a tab with the mouse. Power users likely to benefit most from this optimization likely cycle through tabs using ctrl+tab. Is any thought being given to a way to implement the technique for ctrl+tab users? EDIT: Just spotted the FN saying "Right now, we simply detect whether you’re hovering a tab with a mouse to predict that you’re likely going to choose that, but there are certain more opportunities to introduce warming based on other user behaviours." Hopefully ctrl+tab is one of those behaviors it can be baked into.
- seba_dos1 9y agoSame with addons like Tab Center Redux or Tree Style Tabs, as I can't imagine using the Web without them anymore.
- philsnow 9y agoi had the same thought; there's probably at least 50-100 ms between me holding ctrl and hitting tab (and it makes sense to prewarm the next tab whether i'm going to hit ctrl-tab or ctrl-w)
- enedil 9y agoI frequently use Ctrl-tab or ctrl-shift-tab more than once at a time. It makes sense to preheat tab for a while after first usage of this shortcut.
- crondog 9y agoI can already see the bug report -- 'my CPU usage shoots up when I hold down ctrl.'
- tekacs 9y agoSo https://xkcd.com/1172/ https://xkcd.com/1172/ ?
- barrkel 9y agoHmmm. I don't notice a delay on switching to the wavey tab loaded in the background.
- testplzignore 9y agoSame for me - switching to the wavey tab is instantaneous. However, I do see a ~500-1000ms delay when switching from the wavey tab to any other tab.
- cryptoz 9y ago> And in the event that we were wrong, and you weren’t interested in seeing the tab, we eventually throw the uploaded layers away. No comment on the increased CPU usage/effect on battery life this might have. I haven't tested it yet, but it seems like it could be significant. I hover over way more tabs than I switch to sometimes. I currently have a lot of tabs open (in Chrome) and I switch frequently. However, I hover over a tab only to read the title, rarely to click. I'm interested in checking out Firefox again soon to see the new performance gains (maybe including this one), but does it affect battery life? What if the false positive ratio is nearly 100%, like I suspect it would be for my patterns? Does this affect other performance like scrolling or typing if I've also been hovering over a lot of tabs? Interesting work! Edit: > Maybe this is my Canadian-ness showing, but I like to think of it almost like coming in from shoveling snow off of the driveway, and somebody inside has already made hot chocolate for you, because they knew you’d probably be cold. How sure are you that you won't end up with a whole bunch of hot chocolate that nobody wants? What is the waste factor when the extra work is done unnecessarily?
- deleted 9y ago[deleted]
- hafta 9y ago> How sure are you that you won't end up with a whole bunch of hot chocolate that nobody wants? What is the waste factor when the extra work is done unnecessarily? This is one of the things telemetry data can be used for. We can include telemetry probes in the browser that tell us what percentage of the time users end up switching tabs after hovering. Then we can make informed decisions about whether the feature is worth the extra complexity (and CPU cycles) before any development work is done. As far as tailoring the feature to individual browsing habits, telemetry could inform whether or not that would be worth implementing.
- deleted 9y ago[deleted]
- tjoff 9y agoAnd I guess this wouldn't be possible with opt-in telemetry?
- cryptonector 9y agoI want this off. I know there's a setting. What I really want is to be able to open a link in a tab and not load it (much less render it) until I switch to that tab. Why? Because I sometimes open lots of tabs and don't want those pages to have scripts running even from origins I allow (via NoScript) until I say it's OK (by switching to the tab). Think of it as ephemeral bookmark that I want to get to later.
- hoppelhase 9y agoHow about this? https://addons.mozilla.org/en-US/firefox/addon/loadtabonselect/ https://addons.mozilla.org/en-US/firefox/addon/loadtabonsele... Firefox used to have this option natively. It was removed some day.
- severine 9y agoThank you! A perfect companion for Tab Suspender: https://add0n.com/tab-suspender.html https://add0n.com/tab-suspender.html
- edwhitesell 9y agoThanks for this! It's been one of the missing pieces since 57 was released and the old addon that provided this functionality stopped working.
- cryptonector 9y agoI want this native.
- vortico 9y agoWhy?
- UweSchmidt 9y agoBoth tab warming and tab suspension represent a fundamental way how one may want to use the web. Having these options built in acknowledges that and increases the chance that these options are available in the future, in the browser and as a general pattern on the web.
- stuaxo 9y agoGreat, I want this for when I am hammering Ctrl+Tab or Ctrl+Pageup/Down for the next/prev tab as well.
- mrtweetyhack 9y agoThis is the same kind of shit many software product do by loading their product at startup, their product starts instantaneously. They don't care that it takes up memory, slows startup times, bogs down the computer in general. Another way Mozilla is trying to cheat browser tests at the cost of users. They also sneakily delay loading of certain websites. While I despise these websites, I already have a way of dealing with them by blocking them altogether(no thanks to Mozilla) but Mozilla wants to cheat so that people will think Firefox is fast. Next, they'll load Firefox on startup but keep it hidden. When you "start" it, it appears instantly. Wow. Faster the Chrome. This is also the same kind of shit that pushes users to throw PCs away because it can't handle newer much more bloated software. Thanks for the extra bloat Mozilla, you bunch of slimy cheaters.
- brandonwamboldt 9y agoa) you can disable it via the preference browser.tabs.remote.warmup.enabled b) some users will like this feature. they aren't cheating at making it faster, it actually is faster for all intents and purposes.
- pcwalton 9y agoThere aren't any artificial benchmarks I'm aware of that would benefit from this feature.
- dang 9y agoWe've banned this account for violating the site guidelines. Please don't create accounts to do that with. https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html
- ars 9y agoMaybe it's just me, but switching tabs to this HN page takes longer than his "wavey" example page. On Firefox 52.5.2.
- darklajid 9y agoBoth are instantaneous on 59. Are you staying on 52 for a reason? Is that a ESR version and you require some addons that cannot be ported?
- MBCook 9y agoI don’t know if it applies to them, but I’ve got 52 ESR installed on my computer work because I need access to the Java plug-in.
- ars 9y ago> and you require some addons that cannot be ported Yup, Tab Groups. Plus I need the Unity 3D extension, and ALSA sound (which they also disabled). And Flash (although I know that's still supported for now, I'm never not going to need it - even years from now). I have no idea how I'll ever get off that version. Really not pleased with Mozilla. I can't even go to 57. My current plan is to keep 52 forever, and once it's not supported use the latest version for normal browsing, and launch 52 when I need it. Maybe in some kind of sandbox, since I'm sure there will be unpatched vulnerabilities. I'll have to do something about all my Tab Groups though - I have around 20 or 30 of them, really not looking forward to migrating them, but I'll have no choice. And I'll have to install PulseAudio. I've been using Firefox since it was a beta project (even have bugzilla reports from 1999) and I've never been as disappointed with them. Edit: I know we're not supposed to ask, but I just have to, why did two people downvote this? What could possibly be there to downvote? Am I not allowed to have an opinion on Mozilla or something?
- darklajid 9y agoThanks for that. There are various solutions to tab groups out there, I thought? Just recently my Nightly seemed to have something like that natively (can't find it again now, but it allowed me to categorize tabs into groups)? Cannot comment on Unity. I wasn't aware that Firefox requires Pulseaudio, but I've never understood the resistance against that project either - let's consider it a preference. But why are you personally disappointed with Mozilla? Do you believe that the browser got worse for the general case or is this the feeling of being left out at the side of the road because you have special & specific requirements and preferences that aren't completely common? (I didn't downvote you and I always had and have personal issues with Firefox myself - but I believe that it's becoming a more and more improved browser for ~everyone~ insofar as that's possible)
- alistproducer2 9y agoCool stuff, but can I be crotchety for a sec? I wish we could dispense with all of the cute names given to features, techniques, abstraction, etc that are not intuitive until someone tells you what it means. No one would have any idea what the hell "tab warming" means without being told, which seems unnecessary for something that is a simple concept to understand. It increases the cognitive load in a field that already has a lot of it. Please just give your hack and techniques descriptive names; or better yet, think long and hard whether or not the thing even needs a name. "pre-render on hover" would suffice. It's one more word and I know exactly what it means instantly.
- kakarot 9y agoI understand your point, but in this case I understood the concept of tab warming upon reading the name.
- uuoc 9y agoSeconded. I knew exactly what concept was going to be introduced the moment I read "tab warming".
- wildflowero 9y agoAgreed. I don't know why they keep coming up with these unintuitive naming systems.
- arkadiytehgraet 9y agoI don't know how one can be in IT and never hear about "cold boot/warm boot" or "code hot swapping" (as opposed to "cold" launch) or "warmed up VM" or a hundred other examples, all of which have exactly the same semantics. It is especially confusing to read this from JS developer, where one of the greatest advantages of development environment is precisely hot swapping.
- alistproducer2 9y agoIn context, sure. To be fair, the article's title used the phrase in context. Once you name something, you invite that name to be used both in and out of context, which will lead to confusion. That was my general point, although I made it more concrete than I should've by saying "no one would know what the hell....."
- bitcoindev 9y agoanyone knows how to fix this fundamental firefox flaws why the hell there is no handle window https://stackoverflow.com/questions/48218471/how-to-run-firefox-without-a-window https://stackoverflow.com/questions/48218471/how-to-run-fire...
- lxe 9y agoChrome doesn't seem to suffer from "cold" tabs. Navigating to the page in the example ends up rendering it instantly. Does Chrome have different background rendering techniques than Firefox?
- moz23 9y agoYes, it loads all tabs at startup. That's not a good thing, starting chrom[e/ium] on my old laptop is not a very fast experience, even on my work machines it takes a while.
- DeepYogurt 9y agoI can foresee tracking issues with this if every link I hover over gets pre-fetched then a good dead of network traffic will be generated that otherwise wouldn't. In particular if I don't follow a number of links which I hover.
- dao- 9y agoThis is all about rendering already loaded pages. Nothing will be prefetched for this.
- nkkollaw 9y agoSo sad, all this effort to make Firefox better, and they keep ruining everything with questionable marketing stunts. Hard to recover from the add-on fiasco, IMHO.