News for hackers. Stuff that matters.
Re:Introducing Notion AI by jklinger410 on Wednesday November 16, 2022 @01:50PM (#33628431)
Can you shed some light on why something like Google Docs is able to operate this way but not experience the lag or latency that your app does?
Re:Introducing Notion AI by jitl on Wednesday November 16, 2022 @02:01PM (#33628608)
Typing latency in Notion is generally worse than Google Docs because our renderer & input handling is less efficient than Docs. Docs has substantial lead over Coda, Notion, Dropbox Paper, etc because they use a custom layout engine for presentation that is entirely separate from the input surface. Notion, Paper, etc instead use the Web’s built-in but flawed API for rich text editing called “ContentEditable”. In ContentEditable, generally the rendered output DOM nodes are also the input surface. This is much less expensive to implement, but comes with a bunch of limitations and constraints.
Re:Introducing Notion AI by jklinger410 on Thursday November 17, 2022 @09:58AM (#33639699)
Thank you for the response, it was very illuminating. Is the reason you choose the built-in API instead of building a custom layout engine just due to complexity?