mirror of
https://github.com/zulip/zulip.git
synced 2026-07-09 21:21:47 +08:00
nextAll/prevAll walks the entire DOM, basically. This code only walks the DOM until we find a new .message_row. This speeds up the average time of a call to this function from about 6.38ms to 0.678ms, in my benchmarking. Admittedly, the whole outer loop here could still use some optimization, if we want to; do we really need to call this 1000 times? (imported from commit 852e2f660a16f8cfd7be35d3271aedb1ac481663) |
||
|---|---|---|
| .. | ||
| js | ||
| styles | ||
| third | ||
| favicon.ico | ||