Speaking as one of the original three authors of Google Docs (Writely), but zero involvement in this project (I left Google in 2010): I'm seeing a lot of comments asking how JavaScript-on-Canvas could possibly outperform the highly optimized native code built into the browser engines. It's been a long time since I've really been involved in browser coding, but having written both Writely and, farther back, several na…
Google Docs will now use canvas based rendering
881–890 of 953 posts
Re: Google Docs will now use canvas based rendering
#882I 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…
Did you feel the same when Maps went from HTML to Canvas? There is no factual basis for your claims. The simplest and most obvious answer is performance. Docs these days can take 5-10s to fully open, especially with comments and annotations.
I was thinking it might be assumptions about 3D acceleration hardware.
Re: Google Docs will now use canvas based rendering
#883So we're building binaries, to run them in WASM, that's running in JavaScript, which is running in browser, that is written in C++ .. is that what we're doing now?
1. You write Canvas in Javascript, the article did not mention anything about Canvas in WebAssembly.
2. Although WebAssembly used to run in Javascript with asm.js, WebAssembly code can be executed by V8 engine (C++ based) already.
Re: Google Docs will now use canvas based rendering
#884Earlier quoted context omitted.
Sounds like your problem is the process that requires you to use 1000-page Word documents, not Google doc performance...
Regardless 1000 page documents _are_ the sort of things that full-fledged word processors should be able to support. Writers need to write books, readers need to read books, and computers have more than enough resources to support these use cases.
Re: Google Docs will now use canvas based rendering
#885Earlier quoted context omitted.
Very good point, users do not care that a padding is rounded up or down when they switch from their laptop to their desktop, as long as the application is usable, understandable and visually competent. But mindspace is much more important for interaction, so if their laptop is a Mac, their brain will be in "Mac mode", and "Linux" or "Windows" mode when on their other device. Respecting the platform's conventions will…
I don't think the GP was talking about the app looking consistent with the rest of the platform, but the exact opposite: the app looking the same whatever the platform. Using Flutter allows them to have the app look the same on the browser as on mobile. This means that at best it will look "Mac mode" for everyone, including Windows users; at worst it will look foreign to everyone.
Re: Google Docs will now use canvas based rendering
#886Earlier quoted context omitted.
So I've experienced Docs getting, hmm, sad once the doc you're editing gets beyond something like 30-50 pages. Does this change mean that I can look forward to being able to write hundreds or thousands of pages in a Google Doc without it getting periodically non-performant?
My M1 does not have performance issues like that with docs 3x the size. Breeze right through even with 20+ other tabs open.
Re: Google Docs will now use canvas based rendering
#887Earlier quoted context omitted.
That's because the ad networks require a level of validation of their views that they prefer to have control over with javascript snippets or pixels. But it's technically a bit different, since an ad-blocker could still block those baked in advertisements while it's traditional web technology. If it's a binary blob rendered with canvas, that won't be true anymore, which I think was what the parent comment was getting…
> If it's a binary blob rendered with canvas, that won't be true anymore. The request for the ads will either happen server side or client side. If it happens client side, it can be blocked at the network level by the pihole regardless of whether a blob or js script is making the request. The request happening server side is unlikely per my previous comment.
This is the landscape as I see it:
HTML, ads loaded by user network: Can be blocked at network or in HTML.
Binary blob, ads loaded by user network: Can be blocked at network level
Serverside ads, HTML : Can be blocked by removing the ads in the HTML, and ad-networks don't like it because their views can't be validated and they could be scammed by webmasters.
Serverside ads, binary blob: Can not be blocked by network or by hiding things in the HTML, ad-networks and webmasters would want this because they can get around ad-blockers, but will need to solve view validation, the tradeoff becomes worth it.
Re: Google Docs will now use canvas based rendering
#888Earlier quoted context omitted.
IMHO HTML documents backed by a versioning system (probably fossil or pijul rather than the overly complex git) are the way forward for documents where content is much more important than presentation.
While “text in a VCS” is a great option, it’s obviously far less usable than something like Google Docs, and you still don’t get real-time collaboration, which can be really nice.
P.S.: By researching this, I've stumbled on a (barebones) alternative to Google Docs : HackMD/CodiMD/HedgeDoc : https://demo.hedgedoc.org/
Re: Google Docs will now use canvas based rendering
#889I wrote the terminal canvas renderers in VS Code that has been called out a few times here. Initially I implemented a canvas renderer using just a 2d context to draw many textures which sped things up "5 to 45 times"[1] over the older DOM renderer. Since then I moved onto a WebGL renderer[2] which was mostly a personal project, it's basically the first canvas renderer but better in every way since it works by organiz…
Okay, if anyone else after reading Accessibility needs to be implemented from scratch felt ashamed, raise your hands with me. SW engineers suffer from assuming everyone is like them and there are no corner cases. My Mom was recently sued for violating ADA with her real estate website not working with screen readers well enough.
In other words, even when engineers are aware of it and inclined to do something about it, mgmt still has to care, and I’ve just never seen that once.