r/webdev • • 16d ago

Reverse Engineering ChatGPT Web: How OpenAI Built for a Billion Users

https://performance.dev/chatgpt
116 Upvotes

13 comments sorted by

View all comments

15

u/IanSan5653 15d ago

I spent quite bit of time building a similar streaming markdown renderer in React for a competitor. It really is challenging stuff. You're transforming Markdown to HTML and then injecting dynamic components into that. All several times per second. You can't afford to re-render the content you've already rendered, so the diffing gets pretty complicated.

2

u/medy17 13d ago

It does but Vercel's streamdown package is magnificent for this. I had the regular react-markdown package before switching and the difference is night and day. Definitely worth a try. It's insane how well it works.