Live data from Hacker News

Google Docs will now use canvas based rendering

workspaceupdates.googleblog.com

181–190 of 953 posts

Re: Google Docs will now use canvas based rendering

#181
post #103
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…

It's a bad thing in terms of openness but a good thing in terms of performance and making web applications more like real desktop applications. A lot of DOM work is a nightmare, so I sort of welcome to the Canvas based approach.

> making web applications more like real desktop applications.

Web developers are the only people who actually want this. Its not something that would benefit society / users.

Re: Google Docs will now use canvas based rendering

#182

Am I the only one who doesn't really have any performance issues with Google Docs? The initial loading speed is aggravating - but that is just down to the size of the codebase. Actual rendering performance when I type is imperceptible to me. Putting a few hundred words and a few images onto the screen is presumably very quick whatever technology one uses to render it.

I suspect that accuracy of rendering and consistency across platforms is the bigger concern here.

There are enough differences between how different browsers and operating systems render text via the DOM, to make it very hard to get consistent results between then all. By using canvas they can get very close to pixel perfect consistency. (Especially if they bring their own FreeType library or similar along.)

Re: Google Docs will now use canvas based rendering

#183
post #142

Earlier quoted context omitted.

Isn't Flutter intended exactly for this use case? If Google Docs won't use Flutter then I'd say Flutter has failed badly.

I guess Flutter matters mostly to Ad Words team, as they rescued Dart from falling appart. It remains to be seen how much long lasting love it is having across the Googleplex.

I don't think that's true. Flutter is having a shitload of momentum right now. Just recently Canonical embraced Flutter as a first class option for building Wayland apps. Flutter is running on Google hardware such as smart speakers. Of course you also have the ever-looming Fuchsia OS that will have Flutter as the premier toolkit for apps. Etc. etc.

Re: Google Docs will now use canvas based rendering

#184

We are working on a full-featured Google Docs alternative - https://writer.zoho.com . We are already capitalizing canvas technology for rendering documents across devices, except for the Web which still is DOM. Having a single codebase that renders across all platforms is our long-term motive, and it does require rendering to a cross-platform canvas backend - like Skia. I'm assuming Google Docs is already on that dir…

Does Zoho have a self-hosted version? If not, is there any reason to trade one vendor lock for another?

Re: Google Docs will now use canvas based rendering

#185
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…

I've watched a weird mix of "I don't like javascript" that usually actually translates to "I don't like what some people do with javascript." along side some cheer leading for webassembly...

Now those obviously aren't entirely connected arguments, but whatever "I don't like what some people do with javascript" is supposed to mean, it has nothing to do with javascript. It's just what people do with it.

Here we go now, we've got rando blobs you've got no idea what they're doing... this is not better.

Re: Google Docs will now use canvas based rendering

#187

It makes a hell of a lot of sense, even from a QA perspective alone. Canvas is going to be far more predictable as a rendering target than the wide swath of browsers they manage now. The DOM certainly has a place, but if you've looked at Google docs rendered output you'd notice it left web standards behind a long long time ago. This is an application which happens to be served on the web, not a traditional website. I…

VS Code already shows why Google would do this. They moved the Terminal from DOM nodes to canvas and got somewhere like a 20x render improvement (after already having spent a lot of time optimizing the DOM implementation). The previous jank all but went away too.

EDIT: added their blog article

https://code.visualstudio.com/blogs/2017/10/03/terminal-rend...

Re: Google Docs will now use canvas based rendering

#188
post #103

Earlier quoted context omitted.

It's a bad thing in terms of openness but a good thing in terms of performance and making web applications more like real desktop applications. A lot of DOM work is a nightmare, so I sort of welcome to the Canvas based approach.

Couldn't agree more. Developer Lives Matter. Lifetimes have been lost to simple things like trying to get a modal popup to work.

Please don't riff on the Black Lives Matter movement with things that are more trivial than civil rights. I doubt your intentions were to delegitimize the movement, but still.

Re: Google Docs will now use canvas based rendering

#189
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…

Yet another reason to use Pi-hole. The web browser is the wrong place to try and fight against this sort of thing. Secure your home network once instead of fighting an arms race on each device you have.

How does it help here? They can trivially include ads server-side, pi-hole would see nothing at all.

Re: Google Docs will now use canvas based rendering

#190
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…

You could do that years ago when canvas was introduced. Wasm is more readable than obfuscated JS. You can compile C to JS.
Post reply on HN