When I want to open a file using :FZF ~, given the file selected and enter key pressed, it will cost more than ten seconds to open the selected one. What's more, the delay also comes with <Ctrl-c> to close fzf in vim.
The problem only occurs in bash. In zsh, everything goes well. Any tips to figure it out? Thanks.

Do you use rg as your FZF_DEFAULT_COMMAND? I experienced similar issues when using rg --files as my default command. And that's why I'm still suggesting ag on the readme page when rg has a better implementation of gitignore filtering.
time rg --files | head -1
time ag -g "" | head -1
Yes, I do use rg as my FZF_DEFAULT_COMMAND and have solved it based on your suggestion. Big thanks to your quick response!
They seem to have fixed the issue for *nix systems, but an official release with the fix has not been released yet. I'll check if they have any plans for a new version.
I'm seeing this problem or something similar in vim. Except sometimes it never closes... should I open a new issue?

I'm pretty sure that it's not an issue of fzf or fzf.vim. Does :!which rg point to the right binary?
Anyway, rg still shows some delay in some cases and I now use fd instead which is better suited for this use case.
https://github.com/junegunn/fzf/commit/a6d2ab33609ad20ce107e66d9648d908800fa3ad
jg@jg-mbp:~> time rg --files | head -1
out
real 0m1.601s
user 0m1.298s
sys 0m3.737s
jg@jg-mbp:~> time fd --type f | head -1
out
real 0m0.116s
user 0m0.174s
sys 0m0.162s
I'm actually getting the same behaviour with fd in neovim.
I'm using:
禄 env | grep FZF
FZF_DEFAULT_COMMAND=fd --type f

It wasn't an issue before I formatted this machine... not sure what versions of things I was running before though. The only major thing I can think of is now I'm using the neovim appimage instead of their ubuntu repos as I was before.
I should note the delay is only on the first invocation, if it ever finishes the next one is lightning fast.
@dpnova See if you can still reproduce the problem with the minimal configuration as suggested here.
https://raw.githubusercontent.com/junegunn/fzf.vim/master/.github/ISSUE_TEMPLATE.md
This screenshot is the same behaviour happening with the minimal command (using :FZF)
This is ubuntu 17.10 with nvim appimage.
Let me know if there's something else I can try! Thanks heaps.

I've noticed that sometimes the panel goes away if I select anotoher window/term and then go back to this one... could it be related to waiting for something? I've recently moved back to gnome terminal/tilix from urxvt .. could it be related?
No idea, do you have the same issue on regular Vim?
My simple testing with vim seems to indicate it's isolated to nvim. I could open a bug over there.. I'm not quite sure what I would report as the issue though. I'll link back here. Thanks!
@liuchengxu @junegunn I am using Ag and I am facing the significant delay problem? How to solve it?
Most helpful comment
They seem to have fixed the issue for *nix systems, but an official release with the fix has not been released yet. I'll check if they have any plans for a new version.