From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4147 invoked by alias); 5 Jul 2017 11:37:22 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 41403 Received: (qmail 22437 invoked from network); 5 Jul 2017 11:37:22 -0000 X-Qmail-Scanner-Diagnostics: from aok120.rev.netart.pl by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(85.128.245.120):SA:0(0.0/5.0):. Processed in 2.210624 secs); 05 Jul 2017 11:37:22 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: psprint@zdharma.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at zdharma.org does not designate permitted sender hosts) X-Virus-Scanned: by amavisd-new using ClamAV (21) Date: Wed, 5 Jul 2017 13:37:08 +0200 From: Sebastian Gniazdowski To: zsh-workers@zsh.org Message-ID: Subject: Question about ingetc() vs. word-code X-Mailer: Airmail (442) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello, I noticed quite large number of ingetc() calls: 10,588,088 =C2=A0Src/input.c:ingetc =5BSrc/zsh=5D This is for: - zplugin.zsh compiled - all plugins compiled - all functions in zwc, loaded via autoload -w =46or zplugin uncompiled, it's: 15,315,810 =C2=A0Src/input.c:ingetc =5BSrc/zsh=5D So indeed compilation helps. However, when I did: ingetc(void) =7B =C2=A0 =C2=A0 int lastc =3D ' '; =C2=A0 =C2=A0 if (lexstop) =C2=A0 =C2=A0 =C2=A0 =C2=A0 return ' '; =C2=A0 =C2=A0 =46ILE *f =3D fopen(=22/tmp/reply=22, =22a+=22); =C2=A0 =C2=A0 int loop =3D 0; =C2=A0 =C2=A0 for (;;) =7B =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (f) =7B =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 fprintf( f, =22%c=5Cn=22, inbuf= ptr =3F *inbufptr : 'x' ); =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 fflush( f ); =C2=A0 =C2=A0 =C2=A0 =C2=A0 =7D then I could find in the output: xsource=22=24HHOME/.zplugin/bin/zplugin.zsh=22BIN=5FDIR=5DBIN=5FDIR=5DBIN= =5FDIR=5DZERO=5DZERO=5DBIN=5FDIR=5DZERO=5DBIN=5FDIR=5DBIN=5FDIR=5DBIN=5FD= IR=5DBIN=5F DIR=5DHOME=5FDIR=5DHOME=5FDIR=5DHOME=5FDIR=5DPLUGINS=5FDIR=5DHOME=5FDIR=5D= PLUGINS=5FDIR=5DPLUGINS=5FDIR=5DCOMPLETIONS=5FDIR=5DHOME=5FDIR=5DCOMPLETI= ONS=5FDI R=5DCOMPLETIONS=5FDIR=5DSNIPPETS=5FDIR=5DHOME=5FDIR=5DSNIPPETS=5FDIR=5DSN= IPPETS=5FDIR=5DLEX=5FDIR=5DHOME=5FDIR=5DLEX=5FDIR=5DLEX=5FDIR=5D This source command is fine, it comes from uncompiled =7E/.zshrc. However= , BIN=5FDIR, ZERO, HOME=5FDIR, PLUGINS=5FDIR, SNIPPETS=5FDIR, LEX=5FDIR =E2= =80=93 these ZPLGM hash fields are declared in the beginning of (compiled= ) zplugin.zsh. Or following: CUR=5FUSPL2=5D*=5E=40keyword=5Drst=5D*=5E=40=24uuspl2=5D=24uuspl2=5D=24uu= spl2=5E=40DTRACE=5DCUR=5FUSPL2=5D*=5E=40keyword=5Drst=5D*=5E=40=24uuspl2=5D= =24uuspl2=5D=24uuspl2=5E=40DTRACE=5DCUR=5FUSPL2=5D*=5E=40keyword=5Drst=5D= *=5E=40=24uuspl2=5D=24uuspl2=5D=24uuspl2=5E=40 ZPLGM=5BCUR=5FUSPL2=5D =E2=80=93 zplugin hash field. =24uspl2 - local var= iable. ZPLGM=5BDTRACE=5D - hash field. Why the compiled, not-eval source still exist in hunks in ingetc() input=3F= Many times. The eval-code also appears, but this is probably expected. -- =20 Sebastian Gniazdowski psprint /at/ zdharma.org