mirror of
https://github.com/nginx/nginx.git
synced 2024-12-03 04:39:00 +08:00
The official NGINX Open Source repository.
bf7d76b943
Repeatedly calling ngx_http_upstream_add_chash_point() to create the points array in sorted order, is O(n^2) to the total weight. This can cause nginx startup and reconfigure to be substantially delayed. For example, when total weight is 1000, startup takes 5s on a modern laptop. Replace this with a linear insertion followed by QuickSort and duplicates removal. Startup for total weight of 1000 reduces to 40ms. Based on a patch by Wai Keen Woon. |
||
---|---|---|
auto | ||
conf | ||
contrib | ||
docs | ||
misc | ||
src | ||
.hgtags |