zsh-users
 help / color / mirror / code / Atom feed
From: Filipe Silva <filipe.silva@gmail.com>
To: Richo Healey <richo@psych0tik.net>
Cc: zsh-users@zsh.org
Subject: Re: profile prompt rendering time
Date: Wed, 13 Jul 2016 19:37:08 -0300	[thread overview]
Message-ID: <CAEwkUWMrUKAqnBDOjOx2spRw29zWkkv3w02nCRZLghUVQS_b-w@mail.gmail.com> (raw)
In-Reply-To: <20160713213713.GB75349@xenia>

[-- Attachment #1: Type: text/plain, Size: 1223 bytes --]

Yes! that'd be neat Richo. I was thinking of doing that to the right
prompt.

Thanks Bart. I'll try to work that on a custom prompt.

On Wed, Jul 13, 2016 at 6:37 PM, Richo Healey <richo@psych0tik.net> wrote:

> On 13/07/16 11:17 -0300, Filipe Silva wrote:
>
>> Hi,
>>
>> short version: How can I profile each rendering of a zsh prompt?
>>
>> long version: I've recently came across a plugin (rupa/z) that, when
>> installed, hit my zsh prompt rendering time by a noticeable amount.
>>
>> When I say prompt rendering time, I'm not refering to amount of time that
>> it takes for the first zsh prompt to appear when I issue, for an example,
>> `exec zsh` (that is achieve by issuing `time zsh -i -c "print -n"`).
>>
>> I'm talking about the time that it takes for zsh to give me another prompt
>> once that it is fully loaded. In other words, I want to achieve this:
>>
>> ~ $ ls (when i hit enter, start counting)
>> code/ notes/ file.txt
>> ~ $ (stop counting when this prompt appears. show me elapsed time)
>>
>> Is that a way to do that?
>>
>> thanks in advance,
>>
>> Filipe Silva
>>
>
> You could do something fairly janky and just wrap your whole prompt in a
> function that emits the prompt, and time(1)'s itself.
>

  reply	other threads:[~2016-07-13 22:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-13 14:17 Filipe Silva
2016-07-13 18:08 ` Bart Schaefer
2016-07-13 19:31   ` Filipe Silva
2016-07-13 21:29     ` Bart Schaefer
2016-07-13 21:37 ` Richo Healey
2016-07-13 22:37   ` Filipe Silva [this message]
2016-07-13 23:49   ` Bart Schaefer
2016-07-14  0:23     ` Filipe Silva
2016-07-14  5:25       ` Bart Schaefer
2016-07-14  0:28     ` Nikolay Aleksandrovich Pavlov (ZyX)
2016-07-14  0:49       ` Filipe Silva

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=CAEwkUWMrUKAqnBDOjOx2spRw29zWkkv3w02nCRZLghUVQS_b-w@mail.gmail.com \
    --to=filipe.silva@gmail.com \
    --cc=richo@psych0tik.net \
    --cc=zsh-users@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).