Live data from Hacker News

Google Docs will now use canvas based rendering

workspaceupdates.googleblog.com

391–400 of 953 posts

Re: Google Docs will now use canvas based rendering

#391
post #227

Earlier quoted context omitted.

I've been coding Flutter mobile apps for a couple of years, but have only toyed around with the web target. In my experience it seemed kinda off . Scrolling lists ignored my native scroll speed and janked, text manipulation felt laggy, etc. It reminded me of the good old horrible days when Flash-based websites was widespread. I tested it right after the 2.0 release, so perhaps they've fixed it since. EDIT: Also IIRC…

Yeah that was our primary risk - the actual main.dart.js file becoming too large. We host the JS asset on Cloudfront and the web app from somewhere else, which makes it much better. As far as Flutter Web itself, I only think it became production ready for the web in the last 3 months - literally! It was a bit of a risky choice, but it worked out well for us.

I'm glad it worked out! It's a nice framework to work with, and Dart is a pleasant language. How big is your bundle size atm, if I might ask?

Re: Google Docs will now use canvas based rendering

#393
A lot of discussion going on here, but I want to add two things in support of this change:

1. A browser- and OS-agnostic layout experience will have real effects. Just last week, a doc I wrote on my Mac (with Chrome) ended up with several pages with orphaned text, because the page/section breaks I inserted near the end of a page on purpose ended up breaking for Windows Chrome users due to slight variations in font rendering.

2. They have a sample document linked in that post. The text is still 100% selectable/copyable, and assistive technology is able to read and navigate it.

Re: Google Docs will now use canvas based rendering

#394
post #99

Ever since WebAssembly was first introduced, I thought it was obvious[1][2] that the end game for those that want to control the web is sending opaque binary blobs of code that only use the browser for the canvas tag's framebuffer. Font rendering and layout can all easily be accomplished by embedding libraries like freetype. This breaks all forms of user control - like ad blockers - and turns the web back into cable…

This is what Flutter on the web is, by the way. You can try it out here: https://gallery.flutter.dev/#/ and marvel at the impossible to select text, one of the many affordances violently excised here. If it wasn't still incredibly slow even on a cutting-edge Zen3, Nvidia 3070 system they might almost be on to something here.

Wow, that’s truly a masterpiece in awful. Are they also rendering everything to canvas and then reinventing layouts, controls, etc. to get it so laggy?

Re: Google Docs will now use canvas based rendering

#395

I think this is actually one of the few cases where canvas-based rendering makes sense as a replacement for the DOM. Docs is a full-featured application which already has to re-implement a lot of DOM-like features in order to fulfill its primary function (things like text formatting and layout, spell checking, etc). Doing it all in canvas doesn't sound significantly more difficult than what they're already doing. The…

This is a great example of a comment written by a developer or some otherwise technical person who is so used to thinking and speaking in terms of trees that they can't see the forest, let alone the village it's situated next to and the people inhabiting it. Google Docs may be an app, but a big part of the app, and confirmed to be one of the reasons for the migration here, is the part that renders the document to the…

> Documents are the quintessential use case for the Web, full stop

In 1996, yes. And you can still use the Web that way. Nobody's stopping you. Much of the Web is still used that way, and that's not going to change.

But in 2021, the web serves documents, and applications. And HTML/CSS was never intended as a way to build applications.

It's why people came up with Flash, Java Applets, ActiveX, and all that other shit. And the web today wouldn't be one whit better off if the vendors of those technologies took your advice, and rolled their functionality into the core web. In fact, it would be in many, many ways worse off.

Re: Google Docs will now use canvas based rendering

#396
post #257

Earlier quoted context omitted.

This is what Flutter on the web is, by the way. You can try it out here: https://gallery.flutter.dev/#/ and marvel at the impossible to select text, one of the many affordances violently excised here. If it wasn't still incredibly slow even on a cutting-edge Zen3, Nvidia 3070 system they might almost be on to something here.

A dystopia. You can't control-F in the page. Can't copy and paste a word you don't know into a translator or dictionary. Can't share text unofficially - like copy a sentence into a email, etc.

The copy and paste problem is sidestepped in android by the os native ocr, it might become common elsewhere too.

Re: Google Docs will now use canvas based rendering

#397

I think this is actually one of the few cases where canvas-based rendering makes sense as a replacement for the DOM. Docs is a full-featured application which already has to re-implement a lot of DOM-like features in order to fulfill its primary function (things like text formatting and layout, spell checking, etc). Doing it all in canvas doesn't sound significantly more difficult than what they're already doing. The…

This is a great example of a comment written by a developer or some otherwise technical person who is so used to thinking and speaking in terms of trees that they can't see the forest, let alone the village it's situated next to and the people inhabiting it. Google Docs may be an app, but a big part of the app, and confirmed to be one of the reasons for the migration here, is the part that renders the document to the…

"Displaying documents" and "displaying editable documents" are two completely different beasts. The web browser has never dealt well with displaying editable documents, the closest standard that exists is contentEditable and pretty much everyone agrees that it sucks and is not fit for complex use cases.

Re: Google Docs will now use canvas based rendering

#399

Earlier quoted context omitted.

Decryption is illegal? Lol what?

I think they're implying DRM laws associated with the data-streaming.

I have faith that that's only a matter of time before somebody makes a patch that just does the decryption without fuss.

Re: Google Docs will now use canvas based rendering

#400
post #65

Earlier quoted context omitted.

quite a blanket statement both for web and desktop apps... some are fast some are slow on both platforms, no?

the immense majority of my experience on the web is slow, and on the non-web is fast, it's definitely not 50/50. I wouldn't be able to give you the name of a slow desktop app I use actually.

It’s never about the UI, it’s what it’s trying to do before it renders.

Oracle on the desktop? Slow. Heck, grep is “slow” by this definition. The web renders quite quick if you serve the content quickly.

Even when the possibility of fast is there, companies like Apple and Microsoft overlay things with animations because it is “too jarring”

Post reply on HN