ISC_MEM_TRACKLINES is accidentally quadratic, was Re: support for large batch jobs with mdig
Tony Finch
dot at dotat.at
Mon Jan 23 19:34:13 UTC 2017
Tony Finch <dot at dotat.at> wrote:
>
> If I give mdig more than a few hundred thousand queries it seems to hang
> at the end of the job. On further investigation, there is something
> accidentally quadratic in the cleanup code!
This accidentally quadratic performance is to do with ISC_MEM_TRACKLINES -
turn that off and freeing is instant! But it needs a fix...
---
lib/dns/openssl_link.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/lib/dns/openssl_link.c b/lib/dns/openssl_link.c
index 29facf3..4e0976e 100644
--- a/lib/dns/openssl_link.c
+++ b/lib/dns/openssl_link.c
@@ -122,10 +122,17 @@ id_callback(void) {
#endif
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
-#define FLARG_PASS , __FILE__, __LINE__
+
#define FLARG
#define FILELINE
+#if ISC_MEM_TRACKLINES
+#define FLARG_PASS , __FILE__, __LINE__
#else
+#define FLARG_PASS
+#endif
+
+#else
+
#define FLARG , const char *file, int line
#define FILELINE , __FILE__, __LINE__
#if ISC_MEM_TRACKLINES
--
2.10.1.445.g3cdd5d1
More information about the bind-workers
mailing list