From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22942 invoked by alias); 16 Sep 2015 04:09:16 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 20569 Received: (qmail 23548 invoked from network); 16 Sep 2015 04:09:15 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Authority-Analysis: v=2.1 cv=T/C1EZ6Q c=1 sm=1 tr=0 a=6sZSWjscJ/9JBPY7grSSvQ==:117 a=6sZSWjscJ/9JBPY7grSSvQ==:17 a=N659UExz7-8A:10 a=sajHVr4o-Cej9drrbI8A:9 a=pILNOxqGKmIA:10 Message-id: <55F8EB69.6080205@eastlink.ca> Date: Tue, 15 Sep 2015 21:09:13 -0700 From: Ray Andrews User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-version: 1.0 To: zsh-users@zsh.org Subject: Re: autoload References: <55F465E6.1040405@eastlink.ca> <2125131442086868@web14o.yandex.ru> <55F4930A.40608@eastlink.ca> <150912151040.ZM12254@torch.brasslantern.com> <55F4AF59.70606@eastlink.ca> <150912164339.ZM26555@torch.brasslantern.com> <55F62DA2.9090908@eastlink.ca> <150913193803.ZM25193@torch.brasslantern.com> <55F6403A.1000401@eastlink.ca> <150914132113.ZM26035@torch.brasslantern.com> <55F786EC.2080007@eastlink.ca> <150914204803.ZM26255@torch.brasslantern.com> In-reply-to: <150914204803.ZM26255@torch.brasslantern.com> Content-type: text/plain; charset=windows-1252; format=flowed Content-transfer-encoding: 7bit Some first adventures with Bart's method. Proof of concept only, no checking yet. The kosher method in .zshrc: #autoload -U compinit && compinit -d $ZSHBOOT/zcompdump #autoload -U colors && colors #autoload -U select-word-style && select-word-style shell ... gives: $ time zsh -i -c exit 0.14s user 0.06s system 98% cpu 0.211 total ... now this, after having moved all asked for files into my private ZSHBOOT dir and cooked them up with zcompile: fpath=$ZSHBOOT autoload -w $ZSHBOOT/zsh-boot.zwc compinit -d $ZSHBOOT/zcompdump colors select-word-style shell ... my thinking being that functions which are certain to be called are a good place to start experimenting. ... gives: $ time zsh -i -c exit 0.05s user 0.06s system 97% cpu 0.111 total ... so with just those three autoloads it's twice as fast, saving a whopping 1/10th of a second. All of it in the 'user' category, I don't know if that's significant. Most interesting anyway, and so far it seems to work, tho I'd not be astonished to hear that I've broken something. It might be DOSthink, but I like having everything I need to fire up my zsh in one place thusly: 3 HP-w5--5-Debian1 /aWorking/Zsh/Boot 3$ l Sorting All file types Backwards by Modification Time (): drwxr-xr-x 2 4096 2015-09-11_12:03:21 Backup/ -rw-r--r-- 1 2934 2014-12-02_20:26:53 zbindkey -rw-r--r-- 1 1371 2015-09-13_15:55:51 aliases -rw-r--r-- 1 2375 2015-09-14_08:27:29 zstyle -rw-r--r-- 1 11403 2015-09-15_19:51:07 zmv -rw-r--r-- 1 2230 2015-09-15_19:51:07 select-word-style -rw-r--r-- 1 16435 2015-09-15_19:51:07 compinit -rw-r--r-- 1 3417 2015-09-15_19:51:07 colors -rw-r--r-- 1 5667 2015-09-15_20:25:25 compaudit -rw-r--r-- 1 4015 2015-09-15_20:25:25 compdump -r--r--r-- 1 57984 2015-09-15_20:25:50 zsh-boot.zwc -rw-r--r-- 1 484 2015-09-15_20:26:11 zcompdump -rw-r--r-- 1 5464 2015-09-15_20:43:10 zshrc -rw-r--r-- 1 878 2015-09-15_20:55:39 dirstack -rw------- 1 441938 2015-09-15_20:55:41 histfile ... of course there's more needed stuff as well no doubt, but this at least gives me a bit of focus, and fpath is a single directory :-)