News for hackers. Stuff that matters.
Re:Microsoft's Skydrive sends two million NULL characters by Tomis02 on Monday November 12, 2012 @10:48AM (#4773248)
Right now I have 101 tabs running, and only 6 cores in my CPU. Do you know how much context switching costs in terms of performance? Do you know what the overhead would be if I were using Chrome?

So spare me, please. When general purpose computing moves to GPUs then we'll revisit the idea of "one tab per process". Until then, out of "Chrome, many tabs, performance", pick any two, drop the other.

Re:Microsoft's Skydrive sends two million NULL characters by lallysingh on Monday November 12, 2012 @01:59PM (#4774185)
The context switch itself is almost trivial at that scale -- a couple hundred ns per switch, with the occurrence interval in the 10s-100s of milliseconds, depending on the CPU scheduler. The part that hurts is all the cache invalidation. Unless you're actually swapping. Then you're really hosed.

Well, that and any particularly nasty plugins (cough flash cough) that don't like many instances at once.

Which OS are you running? I have yet to see chrome on linux have any hiccups on as many tabs as I throw at it. The only time I've seen hiccups are when the X server's busy on something else or I'm short on memory.

If you're on another OS, perhaps chrome's suffering b/c it can't share GDI resources (or mac's equiv) across tabs? I'm assuming it can't, as each tab's got a different process ID.

Re:Microsoft's Skydrive sends two million NULL characters by Freaky on Monday November 12, 2012 @11:55AM (#4773595)
Context switching isn't that big a deal, it's actually pretty good for responsiveness since everything isn't being serialised through a single thread. Compare/contrast animgifs on a busy Opera vs a busy Chrome - Opera will regularly freeze momentarily, presumably because of stop-the-world GC.

The bigger problem is having that many tabs open without burning through enormous amounts of memory. Chrome's at least 10x less memory-efficient than Opera in this regard, which isn't great when my Opera sessions regularly run to well over 4GB :)

Re:Microsoft's Skydrive sends two million NULL characters by Tomis02 on Monday November 12, 2012 @12:13PM (#4773673)
You are right, your scenario is much more visible nowadays. It's just that I have in mind my old single core CPU and how Chrome managed to grind my system to a halt with only a dozen tabs.
Re:Microsoft's Skydrive sends two million NULL characters by Evbn on Monday November 12, 2012 @11:35PM (#4776428)
Chrome could do that with one process as well as with 100.
Re:Microsoft's Skydrive sends two million NULL characters by Jare on Monday November 12, 2012 @11:10AM (#4773364)
> Do you know how much context switching costs in terms of performance?

How much do you think? Most of your 101 tabs should be idle, not active, so my guess would be "not much".

Re:Microsoft's Skydrive sends two million NULL characters by Tomis02 on Monday November 12, 2012 @11:24AM (#4773424)
> Most of your 101 tabs should be idle, not active, so my guess would be "not much".

Keep open in the background a few js-intensive websites (e.g. gmail, twitter) and your tabs will be flickering like the proverbial Christmas tree. Depending on your hardware, the paradigm difference can be very noticeable (also, have fun on a laptop's battery).

Re:Microsoft's Skydrive sends two million NULL characters by Cthulhu_ on Monday November 12, 2012 @12:43PM (#4773795)
But Chrome - and any sensible browser, really - will scale down JS execution on pages not in the foreground; you can see this in for example Piecon (http://lipka.github.com/piecon/), which will only update the favicon in your background tab bar at half the speed (if that).
Re:Microsoft's Skydrive sends two million NULL characters by mccr8 on Monday November 12, 2012 @12:40PM (#4773787)
I believe that Chrome caps the number of processes that it uses, so you wouldn't actually be using 101 processes. I think it caps at something like 8, or did when Chrome first came out.
Re:Microsoft's Skydrive sends two million NULL characters by dserodio on Monday November 12, 2012 @02:09PM (#4774241)
"pgrep Chrome|wc -l" gives me 54 right now with 2 windows open (29 tabs + 2 tabs)
Re:Microsoft's Skydrive sends two million NULL characters by mh- on Monday November 12, 2012 @11:20PM (#4776394)
yep, one master, one GPU process.

plus, one per: tab, extension, and plugin.

Re:Microsoft's Skydrive sends two million NULL characters by at-fates-hands on Monday November 12, 2012 @01:05PM (#4773901)
>>>>Right now I have 101 tabs running

Dude, I get claustrophobic if I have more than 4 or 5 tabs open. Dare I ask why you have 100 tabs open?

Re:Microsoft's Skydrive sends two million NULL characters by Tomis02 on Monday November 12, 2012 @01:23PM (#4773988)
Answered the "why" somewhere below, I think you're more concerned about the "how".

Place your tab bar on the left (vertically) and make it wrap to multiple lines (or columns, in this case). I have two columns at the moment, the second one with room for more tabs. Combine this with tab stacking and you have a winner.

You can have your tab bar wrapped to multiple horizontal lines but it's not as efficient given today's widescreen monitors. On lower resolutions (e.g. laptops) it's harder to put as many tabs, but the system is the same and you can still get a decent amount open.

Give it a try, 4-5 tabs is nothing.

Re:Microsoft's Skydrive sends two million NULL characters by LockeWatts on Monday November 12, 2012 @10:52AM (#4773273)
That sounds like a personal problem. Your brain can't possibly handle anywhere near the amount of information 101 tabs provides at once, there's no reason to do that.
Re:Microsoft's Skydrive sends two million NULL characters by anonymous on Monday November 12, 2012 @11:06AM (#4773344)
I use tabs like bookmarks - sites that I might need now or a bit later. I GC them from time to time. Actual bookmarks are used for things like sending a link to myself at home using firefox sync or bookmarking sites I need to visit again and again, like docs sites, the internal bugtracker, etc. I don't open those from the bookmarks menu though, I just type in the awesome bar and firefox always shows bookmarks first, i.e. I use bookmarks as a manual way to bubble up search results in the awesome bar.
Re:Microsoft's Skydrive sends two million NULL characters by jameswyse on Tuesday November 13, 2012 @02:12AM (#4776841)
I use tabs like this too and I'm not really happy about that, I just haven't found a better alternative yet.

What usually happens is I'll be browsing and find an article/code library/inspiring web design/useful tool that I know I can make use of later in some way, but if I just bookmark it then I'll probably forget it's in there.

I have very organised bookmarks but these only work for sites I visit often and I do use tools like Evernote and Gimmebar but it still doesn't feel right.

Perhaps Mozilla have the answer: https://blog.mozilla.org/ux/2012/10/save-for-later/

Re:Microsoft's Skydrive sends two million NULL characters by martindale on Monday November 12, 2012 @12:02PM (#4773621)
I too browse this way, and it's not about processing all the content at once. It's about utilizing the browser's ability to remember things you can't, and establishing a workflow as you move through the tabs.
Re:Microsoft's Skydrive sends two million NULL characters by rplnt on Monday November 12, 2012 @11:50AM (#4773566)
It's a bad habit (I can't think of a situation when 100 tabs would be necessary) but it's still pain if browser can't handle that.
Re:Microsoft's Skydrive sends two million NULL characters by ygra on Monday November 12, 2012 @11:06AM (#4773343)
Often it's just mis-used as a “read later” list.
Re:Microsoft's Skydrive sends two million NULL characters by rplnt on Monday November 12, 2012 @11:53AM (#4773582)
I have forum threads, stackoverflow tags, manuals, ... opened. Not exactly a read later list, although I do use tabs for that as well. I use bookmarks for things I want to save for later. Usually something I've already read (at least partially) to know it's worth saving. (I know a bookmark folder/tag would be enough)
Re:Microsoft's Skydrive sends two million NULL characters by Tomis02 on Monday November 12, 2012 @11:11AM (#4773368)
I always hold at least two digits' worth of tabs open, usually grouped into stacks. For instance, I have a stack of music/radio related tabs (e.g. youtube), several stacks with documentation that I infrequently need, stacks with tabs that I will read sometime later in the week/month/year, stacks related to various issues in the code I am working on, and so on.

I can't be bothered to use bookmarks for these things, having tabs in stacks is much more convenient. If the browser lets me keep a lot of tabs open then I'll abuse this posibility for my personal comfort. If we were to use your philosophy then Chrome should be limited to a certain amount of tabs by design. How about 6, the number of cores in my CPU?

But thank you for the diagnosis dr. Jobs, surely I'm holding the phone the wrong way too. Keep blaming the user.

Re:Microsoft's Skydrive sends two million NULL characters by willtheperson on Monday November 12, 2012 @05:22PM (#4775113)
It's not blaming the user. The user in this case is using the browser in an unintended way. It it therefore the users' own fault if the browser doesn't hold up.

If I want to ride my bike facing the wrong direction, it's not the fault of the designer that I can no longer steer. I could potentially make it work, but would it ever be reasonable for the manufacturer to add another set of handlebars on the back?

As for your comment about Apple claiming the user was holding their phone incorrectly, they did ultimately provide cases right and therefore admitting that enough users were having trouble to merit a change / fix ?

All said, you are using your browser wrong. Sorry to be the one who has to tell you.

Re:Microsoft's Skydrive sends two million NULL characters by chrisherring on Monday November 12, 2012 @10:31PM (#4776239)
That's a poor analogy. The situation of using so many tabs is about making the browser work harder, not in an incorrect manner. So if I was to compare that to riding a bike it would be like pedaling as fast as I could. If the bike couldn't handle it then yes, I would say it was the manufacturers fault.
Re:Microsoft's Skydrive sends two million NULL characters by willtheperson on Tuesday November 13, 2012 @03:35AM (#4777047)
I was thinking of a fixed gear bike. It can operate in both directions. One direction has handlebars.

Designers shouldn't be expected to support efficiency on the side they didn't put the bars.

Re:Microsoft's Skydrive sends two million NULL characters by dthtvwls on Tuesday November 13, 2012 @01:48AM (#4776787)
Hold on to this mentality, and you will never develop great software.
Re:Microsoft's Skydrive sends two million NULL characters by willtheperson on Tuesday November 13, 2012 @03:29AM (#4777034)
The fact is the Chrome efficiently runs many tabs. This guy wants an extreme use case to be primarily supported or the browser must suck.

Supporting it would be a waste of developer time. If they run out of ways to make Chrome faster and have nothing better to do then sure, let's deal with this niche problem.

Re:Microsoft's Skydrive sends two million NULL characters by why-el on Monday November 12, 2012 @12:31PM (#4773755)
I do something similar. If I am to open too many tabs and don't really need the dev tools, i.e. doing some casual browsing, I go for Opera, or Firefox instead of Chrome. I also go for them when travelling and the battery is scarce.
Re:Microsoft's Skydrive sends two million NULL characters by Evbn on Monday November 12, 2012 @11:36PM (#4776433)
Context switching costs far less than the time it takes you to press the key to switch between tabs, and is not appreciably more expensive for a process than for a thread.
Re:Microsoft's Skydrive sends two million NULL characters by qu4z-2 on Monday November 12, 2012 @11:59PM (#4776502)
Cache validation, on the other hand, can be quite expensive. The context switch itself of course less so.