Live data from Hacker News

Google Docs will now use canvas based rendering

workspaceupdates.googleblog.com

61–70 of 953 posts

Re: Google Docs will now use canvas based rendering

#61
post #2

This might be a way to make Google Doc's feature that allows copy/paste to be disabled ( https://workspaceupdates.googleblog.com/2015/07/disable-down... ) to be more secure.

but it is false sense of security as any one can screenshot it and use ocr to generate text again?

Or just intercept the API calls by looking at the network activity tab.

Re: Google Docs will now use canvas based rendering

#62

The dom is really, really fast, we have spent decades refining the process and there is deep tooling to support it built right into the browser. What a bunch of nonsense.

> The dom is really, really fast, no, it is barely tolerable. Web apps in 2021 have trouble reaching the UI performance (latency) of early 2000 desktop software.

Is that the fault of the web apps programmers (or their library/design choices!) or the engine?

Re: Google Docs will now use canvas based rendering

#63

How will they achieve accessibility? I can only imagine screen readers trying to parse a bunch of vectors.

The programmers will need to add accessibility features to their apps: https://html.spec.whatwg.org/multipage/canvas.html#best-prac...

Re: Google Docs will now use canvas based rendering

#64
post #43

Earlier quoted context omitted.

Performance of DOM based rendering is very problematic and not unified across browser implementations. Canvas rendering will likely increase the performance of Google Docs, and make the UX more unified across platforms. Google Docs is really an application built on the web platform. HTML DOM rendering was never intended to give developers the control they need to build fully featured high performant applications, we…

Microsoft Word, Pages and Open Office don't seem to be bottlenecked by rendering performance like Google Docs. Perhaps the browser is the wrong platform for document editing.

I believe this 100%. After using google office for years (just because it's free and cloud-based), I recently tried MS Word and Excel recently at work. The different was mind-blowing. I forgot just how functional and straightforward MS Office is compared to the clunky, barebones google options.

If I wanted a desktop-first, cloud-backed solution, what would be the most future-proof and durable? Can I use Open Office across OSes? What would be the best cloud backup service these days? (just a general question to readers)

Re: Google Docs will now use canvas based rendering

#65

The dom is really, really fast, we have spent decades refining the process and there is deep tooling to support it built right into the browser. What a bunch of nonsense.

> The dom is really, really fast, no, it is barely tolerable. Web apps in 2021 have trouble reaching the UI performance (latency) of early 2000 desktop software.

quite a blanket statement both for web and desktop apps...

some are fast some are slow on both platforms, no?

Re: Google Docs will now use canvas based rendering

#66

The dom is really, really fast, we have spent decades refining the process and there is deep tooling to support it built right into the browser. What a bunch of nonsense.

React (not just React, but they "meme"'d it) sold everyone on the DOM being slow. What they actually meant was that if you add & remove 5,000 elements one at a time in a loop, it's slow. If you don't do that it's plenty fast and all of React's tricks to "make it fast" are just overhead that are bloating and slowing down your "app". (FWIW, I actually kind of like writing React, if I must do front-end JS, so I'm not ha…

> What they actually meant was that if you add & remove 5,000 elements one at a time in a loop, it's slow.

Ok, but it's not trivial to build complex web-based applications that don't do exactly that. This is why there are so many frameworks out there that take care of that problem for you. React isn't the only one. Angular, Vue, and Svelte also handle this for the developer, using various different approaches. It's not just a gimmick. If the web standards themselves were up to the task, there'd be far less need for frameworks.

Re: Google Docs will now use canvas based rendering

#67

The dom is really, really fast, we have spent decades refining the process and there is deep tooling to support it built right into the browser. What a bunch of nonsense.

I have never used a web or electron app that felt subjectively as “snappy” as equivalent desktop apps.

Re: Google Docs will now use canvas based rendering

#68
post #65

Earlier quoted context omitted.

> The dom is really, really fast, no, it is barely tolerable. Web apps in 2021 have trouble reaching the UI performance (latency) of early 2000 desktop software.

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.

Re: Google Docs will now use canvas based rendering

#69
post #24

I don't build extensions or work on much front end web lately but this reads like Google wants more control over their stuff. The web is becoming less open. > By moving away from HTML-based rendering to a canvas-based rendering, some Chrome extensions may not function as intended on docs.google.com and may need to be updated. > If you are building your own integrations with Google Docs, we recommend using Google Work…

in general a lot of dom-nodes can reduce performance and with canvas you have much more control over what and how things get rendered. I would assume this is also nothing new or "special" afaik google spreadsheets is using canvas for years under the hood with some dom for nicer ux

"A lot of dom nodes" is not inherently problematic if you do not insist on twiddling them individually in a JS for-loop. Other than that, it's just HTML - and plain HTML/CSS rendering is blazing fast.

Re: Google Docs will now use canvas based rendering

#70

How will they achieve accessibility? I can only imagine screen readers trying to parse a bunch of vectors.

The programmers will need to add accessibility features to their apps: https://html.spec.whatwg.org/multipage/canvas.html#best-prac...

This is a huge amount of work, and authors are most strongly encouraged to avoid doing any of it by instead using the input element, the textarea element, or the contenteditable attribute.

When the spec warns you in advance that this is a high risk approach.

Post reply on HN