3 ms·
What computationally complex operation would a forum application regularly do? I can't think of any but I've never written a forum application.
by chefandy 3y ago
What computationally complex operation would a forum application regularly do? I can't think of any but I've never written a forum application.
- jacquesm 3y agoDatabase joins for instance. Ranking articles.
- jbm 3y agoWouldn't these happen in the DB? I can see some algorithms for showing related articles being complex — but writing them in Assembly also invites other challenges (them being difficult to update and improve, concentrating on memory issues rather than algorithm, etc...). I still think it's a cool project mind you.
- jacquesm 3y agoKeeping any assembly codebase up and running, especially through changes in requirements is a massive challenge, requires extreme hygiene and will be very, very costly. My largest assembly projects were around the 16K object code mark (the size of the largest EPROM) and I hope to never ever have to do stuff like that again. But the kind of performance you can get out of very modest hardware is amazing.
- 10000truths 3y agoThe DB in this case is SQLite, which is embedded.
- chefandy 3y agoWould that not still result in a disk IO bottleneck? Also, DB code is pretty well optimized. Are we sure that remaking that functionality in assembly will be dramatically better?
- layer8 3y agoFiguring out which posts to display on page 853 in threaded view.
- chefandy 3y agoI can't think of a situation where that wouldn't be a slice of an array based on an integer post ID. Even with an embedded DB the IO should crush that gain, right?
- layer8 3y agoDepends on the data structure. Since new replies may have to be inserted in tne middle, it may not be organized as a linear array.
- zimpenfish 3y ago> a slice of an array based on an integer post ID Can't see how that works when you've got threading going on. e.g. You have posts 1-10 and pages of size 5. 1, 2, 5 are top level posts. 3, 4 are replies to 1. 6, 7, 8, 9 are replies to 5. 10 is a reply to 2. Which means page 1 contains 1, 2, 3, 4, 10 and page 2 is 5, 6, 7, 8, 9.
- chefandy 3y agoOh threading— yeah that's true. I still think of forums in the old school model.
- deaddodo 3y agoDeeply/truly threaded forums are definitely computationally intense. You have to leverage something to recreate the necessary tree from it's database structure (preorder tree traversal, adjacency lists, etc) while applying ACL methods, view transformations, etc on the dataset. This is much less of a problem nowadays though (compared to when forum software was "in vogue").