3 ms·
So I decided to get out of my armchair and have a look at the code. It's a lot to take in and I've never done any work in python but: It looks like they're alr
by aarongough 16y ago
So I decided to get out of my armchair and have a look at the code. It's a lot to take in and I've never done any work in python but:
It looks like they're already doing part of what I proposed above. Each comment is associated directly with a 'link', and after retrieval the tree is sorted on the server-side.
Personally I don't see any reason why the tree couldn't be sorted client-side, sorting definitely seems to be one of their time-sinks, especially given that each tree has to be sorted a number of different ways (by controversy, heat, age, score, etc...), and given that the trees tend to change often (with each vote, and with each new comment)
- ketralnis 16y ago> I don't see any reason why the tree couldn't be sorted client-side The sorting isn't the expensive bit, tmk
- aarongough 16y agoI'd be interested to know what percentage of time it takes up for rendering a comment thread in the live system though.