From owner-freebsd-questions@freebsd.org Fri Sep 15 13:30:26 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E826E16749 for ; Fri, 15 Sep 2017 13:30:26 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: from mail-wm0-x235.google.com (mail-wm0-x235.google.com [IPv6:2a00:1450:400c:c09::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 11CC0676EA for ; Fri, 15 Sep 2017 13:30:26 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: by mail-wm0-x235.google.com with SMTP id r68so8359598wmg.3 for ; Fri, 15 Sep 2017 06:30:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8QmIRi4YMudqMjG8RBFR/3rHrula+eiqE/8CdUFhqfA=; b=KwoVQo+zlq4NE/YGneKfP6G0K5OxrDgjGh5aUUTXcDZGmW6vMexeZ1DDxy5NJb53I5 ERxEh2u9vCyiiF7mvi5qxKnw75xB0oZhekJrTB2/sAxUgCU1u6ioeFLq0IimRf71U3pO GISqlY1ej0hxArBOyQEyBp6ui3qjwob8YkA0vJPukqBjIyfKIhWCBZt0JiongMeifp1A V1Ega8FYOvOyyFO3P/BBVrPE9opNAYjXYk+PRKsq0htUq/cm/ezWAw/2Wu6pICWc5dTN cOgT7DbpHhxL/XUMTnTNw3zYWpGuNSKqUfo/GbXIXaY5QubybTAYigo/nSGXSnGYqgil We+g== X-Gm-Message-State: AHPjjUj9ZVGLgpVoBIeXXdR5rf/jiTY4S687SjYK0tQtfAYZLBru5TW6 kh8R9K8VRZP2jZ2J X-Google-Smtp-Source: AOwi7QA6xiHGmx1j3vcTNaXSG9dcwT6Z9WPmBE1/9Iu6j0t3X7fUoB/N/rw2Vblq1/yOtfMhPt+XxQ== X-Received: by 10.28.104.67 with SMTP id d64mr3042229wmc.15.1505482223970; Fri, 15 Sep 2017 06:30:23 -0700 (PDT) Received: from gumby.homeunix.com ([81.17.24.158]) by smtp.gmail.com with ESMTPSA id l73sm2240432wma.24.2017.09.15.06.30.21 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Sep 2017 06:30:23 -0700 (PDT) Date: Fri, 15 Sep 2017 14:30:19 +0100 From: RW To: freebsd-questions@freebsd.org Subject: Re: Help scripting dns lookup using awk Message-ID: <20170915143019.2e02d386@gumby.homeunix.com> In-Reply-To: <59BB24E4.6060908@gmail.com> References: <59BB24E4.6060908@gmail.com> X-Mailer: Claws Mail 3.15.0 (GTK+ 2.24.31; amd64-portbld-freebsd10.3) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Sep 2017 13:30:26 -0000 On Thu, 14 Sep 2017 20:55:00 -0400 Ernie Luzar wrote: > The following sh script works, but runs very slow. Almost certainly the reason it's slow is that you are doing sequential synchronous lookups. Switching to another language isn't going help much. To speed it up you either need to switch to a language with a DNS library that supports asynchronous lookups or fire-off parallel child processes. The latter is easier.