mirror of https://github.com/zulip/zulip.git
ba243416e3
We now let color_data keep its own state for unused_colors, so that we longer have to pass in a large list of unused_colors every time we want to assign a new stream color. This mostly matters at startup, where we might be cycling through 5000 streams. We claim all the unused colors up front. Each operation now has an upper bound of expensiveness, where the worst case scenario is basically popping off the first element of a list of <= 24 colors. The algorithm is now deterministic, too, to make it easier to test. It's unclear whether random color assignment ever had much benefit, and it made unit testing the algorithm difficult. Now we have 100% line coverage. Fixes part of #10902. |
||
---|---|---|
.. | ||
casper_lib | ||
casper_tests | ||
node_tests | ||
zjsunit | ||
.eslintrc.json | ||
run-casper |