News for hackers. Stuff that matters.
Re:Google Inbox by pcwalton on Wednesday October 22, 2014 @05:24PM (#8495257)
Chrome only, it seems. Disappointing. https://twitter.com/brianleroux/status/524987137892954112
Re:Google Inbox by cromwellian on Wednesday October 22, 2014 @06:08PM (#8495498)
It doesn't use any Chrome specific features and it will work on FF, but it needs to be optimized to get buttery smooth 60fps animations. As you know, the logic for when the various browsers do layout, create layers, upload them to the GPU, etc is different, and that causes divergence rendering performance. It was hard enough to do this on Chrome, it just takes time.

We also ran into a recent difference in the way sparse JS arrays as handled. We use sparse JS arrays for some data structures, but array.splice(0) on Chrome runs much faster than FF when using this to clone a sparse array.

There's no intent to exclude Firefox, engineers are staying late in the office working on it.

Re:Google Inbox by jgon on Wednesday October 22, 2014 @07:34PM (#8495834)
What an incredibly disingenuous reply. Chrome is truly this decade's IE, and watching Google try to play this kind of crap off would be disappointing if it wasn't so insulting.

"There's no intent to exclude Firefox", it just turns out you've done that for like 2 major product releases in a row along with a giant flashing button suggesting that the user downloads Chrome. I'm not stupid, you don't have to lie to my face.

Re:Google Inbox by cromwellian on Wednesday October 22, 2014 @08:04PM (#8495939)
I take offense to someone calling me a liar.

Try typing this into a JS Console: var xx = []; xx[30000000]=42; var yy = xx.slice(0);

It took almost a week to track down this problem where FF was taking 13 seconds to startup. We've spent a lot of time working on this and it is always in the cards to support this on all the other browsers. We've fixed tons of bugs and have gotten closer to it working the way it should, and people have spent countless hours staying very late at the office to try and finish a polished FF release before the deadline, and we just didn't make it in time. I spent the past 5 years of my time working on open web stuff.

Any insinuation that this is an attempt to sell Chrome over Firefox is just flat out wrong. This was a "mobile first" designed app, it's not designed to promote browsers of any stripe, it's designed to promote an experience for gmail users. If we really wanted to shit over a platform, why bother with iOS? Firefox has such a large user base, it can't be ignored, just like iOS can't.

Re:Google Inbox by bzbarsky on Thursday October 23, 2014 @10:18AM (#8498221)
Unfortunately, V8 implements slice() fast at the expense of correctness. A basic edge-case testcase like https://bug1087963.bugzilla.mozilla.org/attachment.cgi?id=85... fails.

That said, it's clearly possible to do this fast _and_ correctly (e.g. IE manages this).

But as a note, some V8 folks would like to remove the buggy-but-fast thing completely. See https://code.google.com/p/v8/issues/detail?id=3612#c2

Re:Google Inbox by cromwellian on Thursday October 23, 2014 @11:53AM (#8498816)
Thanks Mozilla for the quick reaction. We were not really blocked on this as a for-in/Object.getOwnPropertyNames loop is an easy workaround, it's more that finding the cause of an unexplained slow down took a bit of time (the usage comes from another engineer's rpc-serialization library)

Is there a point of contact for rendering/paint performance issues? We've had problems in Chrome where we had to work around excessive invalidation/paints, but those were diagnosed by using Chrome's layer/paint debugging tools and talking to Blink engineers, things may go quicker if when we encounter problems, there's someone we can email for help or a fix.

Re:Google Inbox by tschneidereit on Thursday October 23, 2014 @01:57PM (#8499649)
(SpiderMonkey engineer here)

What VerGreeneyes says is true for our JS engine, too: you can always file bugs in our bugzilla (in the "Core/ JavaScript Engine" component). We react to such bugs very promptly (as you can see in bug 1087963[0] which was fixed six hours after being filed) and, in many cases, can uplift patches from Nightly to Aurora and maybe Beta, so they'll reach release builds more quickly.

If for some reason you're not comfortable with filing a publicly visible bug, you can also abuse the flag for filing security-sensitive bugs. That way, we may be better able to help with issues affecting unannounced products.

For asking questions or getting our attention even more quickly, you can either join us in the #jsapi channel on irc.mozilla.org, send mail to dev.tech.js-engine[1], or send mail to one of the SpiderMonkey engineers directly. A list of these engineers is available at [2], or you can just email me at [my nick]@mozilla.com.

[0] https://bugzilla.mozilla.org/show_bug.cgi?id=1087963 [1] https://lists.mozilla.org/listinfo/dev-tech-js-engine [2] https://wiki.mozilla.org/index.php?title=Modules/Core#JavaSc...

Re:Google Inbox by cromwellian on Thursday October 23, 2014 @04:19PM (#8500518)
Thanks for the info.

I'll make sure we file bugs as repro-case-able issues come up, but if we get stuck on a deeper mystery, we may need some more direct help. We've made a lot of progress, and from a logic and speed issue, a lot has been resolved and mostly working, but animations are janky, and from "subjective" speed point of view, it unfairly makes FF look bad. Based on previous experience with Chrome, hitting the sweet spot of 60fps is usually where the JS developers need help from the rendering engine folks.

Re:Google Inbox by tschneidereit on Thursday October 23, 2014 @05:15PM (#8500800)
That makes a lot of sense, yes. We can profile cases like that and get info/help from people working on the relevant components. It happens fairly frequently that we move perf bugs from the JS component into GFX or DOM bindings or something else entirely. So really, just file a bug in one of these components, maybe CC a person you already interacted with or send an email, and we'll do the triage.
Re:Google Inbox by VerGreeneyes on Thursday October 23, 2014 @12:21PM (#8499012)
If you just file a bug on Bugzilla (https://bugzilla.mozilla.org/) in the Core: Graphics component with a reproducible testcase that will probably get people looking at it pretty quickly. For more one-on-one contact I'd suggest the #gfx channel on the Mozilla IRC, although that tends to work best if you know who to reach out to specifically. The gfx newsgroup (https://groups.google.com/forum/#!forum/mozilla.dev.tech.gfx) might also work to call attention to a particular issue. You can probably setup an e-mail contact through one of those channels if that's what you prefer.
Re:Google Inbox by cpeterso on Thursday October 23, 2014 @03:31PM (#8500222)
This is a real Firefox bug, but consider the reverse situation: if Firefox's slice() was fast and Chrome's was slow, would Google ship Inbox with a message that says "Inbox only works in Mozilla Firefox. More browsers coming soon. Download Mozilla Firefox."? Probably not. The Inbox team would probably pull in the V8 team. Apparently, the Inbox team didn't contact Mozilla's SpiderMonkey team because they fixed their bug within a couple hours:

https://bugzilla.mozilla.org/show_bug.cgi?id=1087963

Re:Google Inbox by bkerensa on Wednesday October 29, 2014 @02:20PM (#8528876)
Even more odd is they still have their message about FF not being supported for Inbox up for Nightly. I just switched my User Agent to Chrome and Inbox works fine in FF.
Re:Google Inbox by tedmielczarek on Thursday October 23, 2014 @11:25AM (#8498626)
I can sympathize with you because cross-browser development can be frustrating at times. However, when you ship a product and only support one browser (which happens to be the browser your company makes) you're making a statement (even if it's only implicit) that you don't really care about the open web. You personally may care about the open web, and I'm glad the issue is fixed internally, but releasing a major web application with support for only one web browser is a big "fuck you" to the web.
Re:Google Inbox by jongalloway2 on Thursday October 23, 2014 @06:01AM (#8497395)
This returns in in 3ms on IE11. Just for fun, I tested on IE6; it's just as fast. http://imgur.com/CFRSNoq

Try it yourself: http://canhaz.azurewebsites.net/ http://www.browserstack.com/start#os=Windows&os_version=XP&b...

Re:Google Inbox by robin_reala on Thursday October 23, 2014 @06:01AM (#8497394)
Have you got the Bugzilla id for this issue? I’d be interested to track it.
Re:Google Inbox by dochtman on Thursday October 23, 2014 @07:13AM (#8497566)
Re:Google Inbox by robin_reala on Thursday October 23, 2014 @02:37PM (#8499893)
That was quick: a patch was checked in earlier!
Re:Google Inbox by Touche on Wednesday October 22, 2014 @08:48PM (#8496132)
> Try typing this into a JS Console: var xx = []; xx[30000000]=42; var yy = xx.slice(0);

What specific problems does this create that prevents you from shipping with a degraded experience?

Or feature detect this problem and serve some type of notice.

If bleeding-edge Chrome is the only browser good enough for this site then it's a problem with the site's architecture.

> Any insinuation that this is an attempt to sell Chrome over Firefox is just flat out wrong.

Maybe not you in the engineering team, but the designers / PMs who decided to stick a "install Chrome instead" banner definitely had it in mind.

> Firefox has such a large user base, it can't be ignored, just like iOS can't.

That's either a lie or incredibly naive. You wouldn't have shipped without iOS. Full-stop.

Re:Google Inbox by cromwellian on Wednesday October 22, 2014 @09:43PM (#8496304)
>What specific problems does this create that prevents you from shipping with a degraded experience?

It's not just a degraded experience as in 'turn off this feature', the bug in question affects the entire infrastructure of how the app works, since it is part of the message passing and serialization mechanism used. It's legal, standard, JS, that just happens to run slow.

In this case, a workaround is available, and it is already fixed, but not shipped, because we froze commits some time ago for launch.

> That's either a lie or incredibly naive. You wouldn't have shipped without iOS. Full-stop.

You mean like we didn't ship support for Android tablets? You would have thought with the big Android Lollipop and Nexus 9 launch, we would have made sure this worked there, right?

Maybe you should think about Hanlon's Razor as an explanation.

Re:Google Inbox by fabrice_d on Wednesday October 22, 2014 @07:15PM (#8495776)
Still, people wanting to use it will likely switch to chrome. That's a tactic google already used for hangouts - only to end up with a very unconvincing "oops, that was a mistake" answer (see https://twitter.com/johnath/status/486575645338918912).

Instead, you could just notify the user that performance may not be as good on other browsers for now.

Re:Google Inbox by cpeterso on Thursday October 23, 2014 @01:19PM (#8499391)
> It doesn't use any Chrome specific features and it will work on FF

Does "will work on FF" mean "FF will eventually be supported"? Because today we see: "Inbox only works in Google Chrome. More browsers coming soon. Download Google Chrome."