zsh-workers
 help / color / mirror / code / Atom feed
From: "Benjamin R. Haskell" <zsh@benizi.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: zsh-workers@zsh.org
Subject: Re: (bug report) Starting zsh takes ~5 seconds with the latest commits after 20th of September with big history file
Date: Sun, 26 Sep 2010 21:26:08 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LNX.2.01.1009261643520.30023@hp> (raw)
In-Reply-To: <100926131528.ZM407@torch.brasslantern.com>

On Sun, 26 Sep 2010, Bart Schaefer wrote:

> I was somewhat concerned that this was going to happen.  This must be 
> because of zsh-workers/28295 (use lexer to split words from history).
>
> The logging-off part is actually of more concern, it's probably 
> because you are sharing history and/or have some of the 
> duplicate-suppression options set.
>
> Probably the right thing to do is:
>
> (1) have an option for the new behavior (HIST_LEX_WORDS ?);
>
> (2) implicitly turn that option off on the way through shell exit, so
>    history rewrites/comparisons use faster processing.
>

Not that confirmation was needed, but yes, that's the commit that did 
it:

$ git tag workers-28295 5ca08ec

# see git-build-zsh script below...

$ git build-zsh workers-28295~1
$ time /tmp/zsh-git-workers-28295\~1/bin/zsh -i =(print -l exit) > /dev/null
[...] 1.224 total

$ git build-zsh workers-28295
$ time /tmp/zsh-git-workers-28295/bin/zsh -i =(print -l exit) > /dev/null
[...] 5.108 total

Personally, I don't think I'd ever turn on a HIST_LEX_WORDS option.  (As 
mentioned in the other thread, I was just glad there was a simple 
explanation for the seemingly buggy behavior.)

Starting to regret noticing the problem in the first place. :-\

On the other hand it might be yet-another kick in the pants I need to 
start hacking a DB-based history mechanism.

[The first kick:]

I like to keep my entire history (HISTSIZE=50000000, SAVEHIST=$HISTSIZE, 
setopt extended_history).  But, occasionally I'll let my home dir 
partition fill up (usually from forgetting that I have a Wireshark 
instance up in the background, slowly chewing up disk space).  After I 
clear out some space, the entire history file gets its timestamps reset 
to the current time.  I check it in to git daily, but still, it's 
frustrating to lose any history.

-- 
Best,
Ben

==> git-build-zsh <==
#!/bin/zsh

die () { echo "\e[31m"$argv"\e[0m" ; exit 1 }
(( $#argv )) || die "Usage: $0 revision"

script=$0:t
rev=$1
TRAPZERR () { die "Failed: $last_cmd" }
TRAPDEBUG () {
 	last_cmd=$ZSH_DEBUG_CMD
 	print -n "\e]2;$last_cmd - $script $rev\a"
}

git co $rev
autoreconf
./configure --prefix=/tmp/zsh-git-$rev --enable-multibyte
make -j5
make install


  reply	other threads:[~2010-09-27  1:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-26 18:12 Evgeny Burmentyev
2010-09-26 20:15 ` Bart Schaefer
2010-09-27  1:26   ` Benjamin R. Haskell [this message]
2010-10-02 19:41     ` PATCH " Bart Schaefer
2010-10-02 19:54       ` Bart Schaefer
2010-10-02 18:58   ` Peter Stephenson
2010-10-02 20:04     ` Bart Schaefer
2010-10-02 21:06       ` Peter Stephenson

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=alpine.LNX.2.01.1009261643520.30023@hp \
    --to=zsh@benizi.com \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).