zsh-workers
 help / color / mirror / code / Atom feed
From: Martijn Dekker <martijn@inlv.org>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: [PATCH] use .zwc files with identical timestamps
Date: Mon, 5 Mar 2018 01:54:42 +0000	[thread overview]
Message-ID: <37c4799b-f7d8-87b3-fca1-48ce3916b779@inlv.org> (raw)
In-Reply-To: <42ad6851-3c3a-f48b-0742-83df943ce814@inlv.org>

Op 14-02-18 om 06:11 schreef Martijn Dekker:
> I have been experimenting with zcompile to speed up loading sourced
> library scripts. I found that .zwc files are not used if their timestamp
> is identical to that of the source file. This can occur, for example, if
> an installer script installs a script file and zcompiles it immediately
> after. The granularity of file system timestamps, at least on my system,
> is not sufficient to register a difference.
> 
> I think it should be a safe enough assumption that they correspond if
> the timestamps are identical. The attached patch allows zsh to use .zwc
> files if their timestamp is greater than, or identical to the source
> file's timestamp.

Any opinions on this?

Note that this might also fix the issue reported in zsh-workers/41396:

| I extract functions from .plugin.zsh files, then compile them as
| digest: zcompile -Uz lexicon.zwc functions/*
If that compilation is done immediately after the extraction, then in
most cases the .zwc files would never actually be used as they'd have
timestamps identical to those of the source files.

- M.


  reply	other threads:[~2018-03-05  2:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-14  6:11 Martijn Dekker
2018-03-05  1:54 ` Martijn Dekker [this message]
2018-03-05  9:32   ` 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=37c4799b-f7d8-87b3-fca1-48ce3916b779@inlv.org \
    --to=martijn@inlv.org \
    --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).