Remix.run Logo
CableNinja 3 days ago

Took a quick glance through the code, its a pretty decent basic go at it.

i can see a few reasons for slowness - you arent using multiprocessing or threading, you might have to rework your rendering for it though. You will need to have the renderer running in a loop, re-rendering when the stack changes, and the multiprocessing/thread loop adjusting the stack as their requests finish.

Second, id recommend taking a look at existing python dom processing modules, this will allow you to use existing code and extend it to fit with your browser, you wont have to deal with finding all the ridiculous parsing edgecases. This may also speed things up a bit.

Id also recommend trying to render broken sites (save a copy, break it, see what your browser does), for the sake of completion

logicallee 3 days ago | parent [-]

thank you for your quick code review and for these many helpful tips! I'll take a look at them and see what I can put into practice.

EDIT: Unfortunately, it seems that the code is getting near the limit of the context window for Claude, so I'm not able to add several of the feature suggestions you added with the present approach. I'll look into breaking it up into multiple smaller files and see if I can do any better.