Google Docs will now use canvas based rendering
Speaking as one of the original three authors of Google Docs (Writely), but zero involvement in this project (I left Google in 2010): I&#x27;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&#x27;s been a long time since I&#x27;ve really been involved in browser coding, but having written both Writely and, farther back, several native-app word processing engines, here are some thoughts.<p>Word processors have extremely specific requirements for layout, rendering, and incremental updates. I&#x27;ll name just two examples. First, to highlight a text selection in mixed left-to-right &#x2F; right-to-left text, it&#x27;s necessary to obtain extremely specific information regarding text layout; information that the DOM may not be set up to provide. Second, to smoothly update as the user is typing text, it&#x27;s often desirable to &quot;cheat&quot; the reflow process and focus on updating just the line of text containing the insertion point. (Obviously browser engines support text selections, but they probably don&#x27;t expose the underlying primitives the way a word processor would need. Similarly, they support incremental layout + rendering, but probably not specifically optimized in the precise way a word processor would need.)<p>Modern browser engines are amazing feats of engineering, but the feature set they provide, while enormous, is unlikely to exactly match the exacting requirements of a WYSIWYG word processor. As soon as your requirements differ even slightly from the feature set provided, you start tipping over into complex workarounds which impact performance and are hell on developer productivity and application stability &#x2F; compatibility.<p>This is loosely analogous to CISC vs. RISC: browsers are amazing &quot;CISCy&quot; engines but if your use case doesn&#x27;t precisely fit the expectations of the instruction set designer then you&#x27;re better off with something lower-level, like Canvas and WASM. (I don&#x27;t know whether Docs uses WASM but it would seem like a good fit for this Canvas project.)<p>Frameworks in general suffer from this problem. If you&#x27;ve ever had to fight with an app framework, or orchestration framework, or whatever sort of framework to accomplish something 5% outside of what the framework is set up to support, then you understand the concept.<p>Also, as noted in many comments here, browser engines have to solve a much more general problem than Docs, and thus have extra overhead.