Mercurial > hg > nginx-quic
view auto/lib/md5/makefile.bcc @ 5991:435ee290c2e1
Upstream hash: speedup consistent hash init.
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.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Mon, 02 Mar 2015 18:41:29 +0300 |
parents | d620f497c50f |
children |
line wrap: on
line source
# Copyright (C) Igor Sysoev # Copyright (C) Nginx, Inc. CFLAGS = -q -O2 -tWM $(CPU_OPT) -DL_ENDIAN !if "$(MD5_ASM)" == "YES" md5.lib: cd $(MD5) bcc32 -c $(CFLAGS) -DMD5_ASM md5_dgst.c tlib md5.lib +md5_dgst.obj +"asm\m-win32.obj" !else md5.lib: cd $(MD5) bcc32 -c $(CFLAGS) md5_dgst.c tlib md5.lib +md5_dgst.obj !endif