| ▲ | smy20011 3 hours ago | |||||||||||||||||||||||||
The way Claude did it is fight entropy with entropy. "Add a static composer into the HTML" <- This seems like something can be done with SSR? "For faster navigations, we kept the composer mounted between conversations" <- Your SPA should cache this between pages, why fetching it every time? Or you need better routing for your react components. "cheap first-character check before the regex" <- Should we cache compiled Regex instead? I think even 1.3 sec to load the front page is unacceptable. Something need to be reworked from basics (SSR, chunk-based rendering) to solve the problem. Focusing on invidual benchmarks may miss the opportunity. | ||||||||||||||||||||||||||
| ▲ | crooked-v an hour ago | parent | next [-] | |||||||||||||||||||||||||
Even Next.js, for all that people are unhappy about its quirks, complexity, and random undocumented behavior and bugs (God help you if you ever want to try and actually use parallel routes as documented), can do all of this SPA stuff out of the box. Use `<Suspense>` appropriately on data loading, and everything static (including e.g. purely input-output components like editors) will load once and be re-used forever, and your Suspense-wrapped items will show a loading placeholder and only re-load when you intentionally re-trigger the data loading (which you can push down all the way to the level of individual buttons if you want). | ||||||||||||||||||||||||||
| ▲ | rustystump 2 hours ago | parent | prev [-] | |||||||||||||||||||||||||
The amount of complexity added for the gains is depressing. I am confident a human and about 5 minutes with chrome debugger would yield better results with a fraction of the complexity at a fraction if the cost and in a fraction of the claude baby sitting time. Reading this shows the authors have a profound lack of fundamental understanding on how to effectively optimize in the web domain. This isnt claude being bad but how wild it is watch people from the cutting edge of ai brag about pretty mediocre gains. | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||