zulip/frontend_tests
Steve Howell ba243416e3 stream_color: Make stream color assignment more efficient.
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.
2018-11-29 13:00:25 -08:00
..
casper_lib eslint: Enable `conditionalAssign` config of no-trailing-spaces rule. 2018-06-11 07:51:24 -04:00
casper_tests copy/paste: Try to fix Casper flake and add comments. 2018-11-27 21:42:16 -08:00
node_tests stream_color: Make stream color assignment more efficient. 2018-11-29 13:00:25 -08:00
zjsunit user groups: Improve styling of user groups in admin view. 2018-08-13 16:13:49 -07:00
.eslintrc.json lint: Check eslint indentation for casper tests. 2018-05-06 19:35:18 -07:00
run-casper tools: Remove pointless uses of shell=True. 2018-07-30 22:39:06 -07:00