Skip to content

FPP is really slow if your zsh config takes a while to load #301

Open

Description

@spatten

When I run fpp there's a 3 second pause between me selecting what file I want to open and the file actually opening in my editor. My editor is an already running emacs daemon, so it should be super fast to open a file.

I'm also running zsh as my shell.

It took me a while to figure out, but the root cause is that fpp is starting up a new instance of zsh with the -i flag, and that my .zshconfig is really big and takes a while to load.

If I edit the fpp script and comment out these lines, then the pause goes away (and everything still works just fine):

if [ -z "$VIMRUNTIME" -a "$NONINTERACTIVE" = false ]; then
  IFLAG="-i"
fi

So this is mostly my fault -- I have too much config in my .zshrc and it takes a long time to load -- but everything works for me without the -i flag being passed to zsh. I'm assuming that there are use cases where the -i flag is necessary, but this might be causing tons of people to think that fpp is slow to open.

Would it be possible to set an env variable or something so that the -i flag is never passed to zsh, or to not use the -i flag by default?

Activity

  1. pcottle commented on May 12, 2019

    @pcottle
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions