ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Eugene Prokopiev <john@rmts.donpac.ru>
To: community@altlinux.ru
Subject: Re: [Comm] Ldap scripting: bash vs perl
Date: Wed, 26 May 2004 13:08:51 +0400
Message-ID: <40B45EA3.7070302@rmts.donpac.ru> (raw)
In-Reply-To: <20040526122005.2c2fa8f2@phantom.intranet.atk>

Klimchev Konstantin пишет:

> On Wed, 26 May 2004 12:04:41 +0400
> Eugene Prokopiev <john@rmts.donpac.ru> wrote:
> 
> 
>>на моих данных (25 хостов) и моем железе ( P-150/32M ОЗУ для 
>>ldap/squid/iptables/ulogd ) такая замена ничего не меняет. bash решает 
>>задачу быстрее всех, несмотря на grep и awk. Так что если переписать 
>>скрипты один в один (чтоб каждый выдавал только список ip), IMHO особой 
>>разницы не будет.
> 
> 
> 25 хостов не показатель, вот если выборка была хотя бы на 500-600, тогда "локальная работа" ох как дала о себе знать.
> 
> на пример, 
> первый мой скрипт отработал (вернулось с лдап - 25 записей):
> real    0m0.152s
> user    0m0.010s
> sys     0m0.010s
> 
> а второй (вернулось с лдап - 900 записей):
> real    0m0.659s
> user    0m0.040s
> sys     0m0.060s

не спорю, но "локальная работа" у меня во всех случаях - представление 
хостов в  требуемом виде. Лишние хосты локально не отфильтровываются, 
отфильтровываются только их атрибуты.

Так что вывод остается неизменным, как и порядок способов выборки из 
ldap с точки зрения производительности:

1. bash (за счет того, что главную работу делает бинарник ldapsearch)
2. python, ruby, php
3. perl ;)

Если бы выборка была на 500-600, то, может быть, порядок бы и поменялся.

-- 
С уважением, Прокопьев Евгений



      reply	other threads:[~2004-05-26  9:08 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-24 10:07 Eugene Prokopiev
2004-05-24 10:10 ` Alexey Morsov
2004-05-24 10:36   ` Eugene Prokopiev
2004-05-24 11:06     ` Mike Lykov
2004-05-24 11:10       ` Eugene Prokopiev
2004-05-24 10:22 ` Klimchev Konstantin
2004-05-24 10:29   ` Eugene Prokopiev
2004-05-24 10:45     ` Alexey Morsov
2004-05-24 10:59       ` Eugene Prokopiev
2004-05-24 11:22     ` Klimchev Konstantin
2004-05-24 11:32       ` Eugene Prokopiev
2004-05-25  7:43 ` Klimchev Konstantin
2004-05-25  8:21   ` Mike Lykov
2004-05-25  8:31     ` Klimchev Konstantin
2004-05-25  8:51       ` Mike Lykov
2004-05-25  8:58         ` Klimchev Konstantin
2004-05-25 10:43 ` [Comm] " Alexey Tourbin
2004-05-26  6:06 ` [Comm] " Eugene Prokopiev
2004-05-26  6:14   ` Klimchev Konstantin
2004-05-26  8:04     ` Eugene Prokopiev
2004-05-26  8:20       ` Klimchev Konstantin
2004-05-26  9:08         ` Eugene Prokopiev [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40B45EA3.7070302@rmts.donpac.ru \
    --to=john@rmts.donpac.ru \
    --cc=community@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git