Live data from Hacker News

Google Docs will now use canvas based rendering

workspaceupdates.googleblog.com

51–60 of 953 posts

Re: Google Docs will now use canvas based rendering

#51

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…

I would not consider myself super deep in web technology, but rendering to canvas allows programmers to have pixel perfect control over the look of their applications across all devices. Currently, web developers need to "reset" lots of default rendering behaviors in every major browser to ensure that their applications look the same.

After building lots of specialized UI components within the HTML standard, a programmer may ask themself if they might as well write their own UI library. Specifically, lots of specialized applications have UI components which do not have a corresponding HTML standard. For example, in a spreadsheet, a cell may have a clickable triangle in its upper right corner that should display a comment bubble. Should a programmer create that in css or write a specialized library?

Re: Google Docs will now use canvas based rendering

#52

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 must be missing something, its a "bunch of nonsense" whenever someone claims they're better off rendering to canvas for performance?

Re: Google Docs will now use canvas based rendering

#54
post #37

Are they going to duplicate all the logic to handle all the keyboard events, mouse events, composition events? Wow

They unfortunately already do. The state of contentEditable on the web is such that you need to if you want to have a non standard experience like google docs.

Re: Google Docs will now use canvas based rendering

#55
post #12

Earlier quoted context omitted.

The part I don’t understand is how in the world is a renderer written in JavaScript better performing than their own Chrome c++ code? With Edge being a Chrome clone and Safari being also performant browser, what are they worried about?

Their own renderer has to support all of HTML and CSS. Slapping some rectangles on a raster surface has a lot less to worry about.

"Slapping some rectangles on a raster surface" can also be done in HTML/CSS, with the right options (set 'overflow' content to be clipped with no reflow).

Re: Google Docs will now use canvas based rendering

#56

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…

I have a running theory - Google doesn't create a product unless it captures data in a unique manner compared to their other products. Maybe they have moved past this phase. Maybe I just don't see the collection happening here.

Re: Google Docs will now use canvas based rendering

#57

RIP web accessibility when everyone starts doing this to make ad blocking more difficult

Seems far-fetched that normal webpages would use canvas as the primary method to render text something like Google docs makes sense because it's a complex application and consistency is important. For these type of sites if they choose to put ads on I would not try to block them because clearly the effort the developers put to build them justifies displaying ads.

Additionally, I can see future ad blockers also getting more sophisticated by finding a way to block already rendered elements on a canvas without having access to the representational elements (reverse engineering).

Re: Google Docs will now use canvas based rendering

#58
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.

Microsoft Word and Pages both also have web apps, for years, that are 'bottlenecked by rendering performance' (would put it as 'clearly would be improved by better rendering performance', as you're noting)

Re: Google Docs will now use canvas based rendering

#60

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.

[deleted]
Post reply on HN