Comments (24)
Ah, sorry, I got ignored vs untracked wrong.
Still, I think you'll find performance with my Rails project quite slow. Don't forget to do yarn
to populate the node_modules
directory (which is where the problem is).
I suspect it is the same problem that the original poster encountered.
from vim-fern-git-status.
let g:fern_git_status#disable_untracked = 1
Looks lite it helps!
So I comment all other line and it still works good
from vim-fern-git-status.
[??]
is for untracked files, it comes from git status
itself (I suspect).
You should not be seeing that if you are using fix-performance
branch with let g:fern_git_status#disable_untracked = 1
.
from vim-fern-git-status.
Thanks for the report. I didn't observe performance issue so please provide profiling information by
- Move to the directory
let g:fern#profile = 1
:Fern .
let g:fern#profile = 0
:Capture message
(https://github.com/tyru/capture.vim)
You will see something like
| fern#helper:helper.async.expand_node [enter]
| | fern#internal#node#expand [enter]
| | | fern#internal#node#children [enter]
| | | | fern#scheme#file#provider:provider_get_children [enter]
| | | | | fern#scheme#file#util#list_entries_find [enter]
| | | | | fern#scheme#file#util#list_entries_find [leave] 0.004873 [0.004873]
| | | | fern#scheme#file#provider:provider_get_children [leave] 0.006943 [0.006943]
| | | fern#internal#node#children [leave] 0.008191 [0.008191]
| | | fern#internal#node#expand [children] 0.008485 [0.008485]
| | | fern#internal#node#expand [sort] 0.000817 [0.009302]
| | | fern#internal#node#expand [extend] 0.000285 [0.009588]
| | fern#internal#node#expand [leave] 0.000293 [0.009881]
| | fern#helper:helper.async.update_nodes [enter]
| | | fern#internal#core#update_nodes [enter]
| | | | fern#internal#core#update_nodes [hidden] 0.000889 [0.000889]
| | | | fern#internal#core#update_nodes [include] 0.000518 [0.001407]
| | | | fern#internal#core#update_nodes [exclude] 0.000507 [0.001914]
| | | | fern#internal#core#update_nodes [let] 0.000271 [0.002185]
| | | | fern#internal#core#update_marks [enter]
| | | | | fern#internal#core#update_marks [resolve] 0.000432 [0.000432]
| | | | | fern#internal#core#update_marks [key] 0.000704 [0.001136]
| | | | | fern#internal#core#update_marks [filter] 0.000349 [0.001485]
| | | | fern#internal#core#update_marks [leave] 0.000258 [0.001743]
| | | fern#internal#core#update_nodes [leave] 0.002135 [0.004320]
| | fern#helper:helper.async.update_nodes [leave] 0.005097 [0.005097]
| fern#helper:helper.async.expand_node [leave] 0.016042 [0.016042]
| fern#internal#viewer:init [expand] 0.033855 [0.033855]
| fern#helper:helper.async.reveal_node [enter]
| | fern#internal#node#reveal [enter]
| | fern#internal#node#reveal [leave] 0.000234 [0.000234]
| | fern#helper:helper.async.update_nodes [enter]
| | | fern#internal#core#update_nodes [enter]
| | | | fern#internal#core#update_nodes [hidden] 0.000887 [0.000887]
| | | | fern#internal#core#update_nodes [include] 0.000520 [0.001407]
| | | | fern#internal#core#update_nodes [exclude] 0.000574 [0.001981]
| | | | fern#internal#core#update_nodes [let] 0.000263 [0.002243]
| | | | fern#internal#core#update_marks [enter]
| | | | | fern#internal#core#update_marks [resolve] 0.000535 [0.000535]
| | | | | fern#internal#core#update_marks [key] 0.000553 [0.001088]
| | | | | fern#internal#core#update_marks [filter] 0.000388 [0.001476]
| | | | fern#internal#core#update_marks [leave] 0.000280 [0.001756]
| | | fern#internal#core#update_nodes [leave] 0.002154 [0.004397]
| | fern#helper:helper.async.update_nodes [leave] 0.005141 [0.005141]
| fern#helper:helper.async.reveal_node [leave] 0.006179 [0.006179]
| fern#internal#viewer:init [reveal] 0.006581 [0.040436]
| fern#helper:helper.async.redraw [enter]
| | fern#renderer#nerdfont#s:render [enter]
| | fern#renderer#nerdfont#s:render [leave] 0.002524 [0.002524]
| | fern#helper:helper.async.remark [enter]
| | fern#helper:helper.async.remark [leave] 0.002653 [0.002653]
| | fern_git_status#process#show_toplevel [enter]
| | | fern_git_status#process#status [enter]
| | | fern#helper:helper.async.redraw [leave] 0.012959 [0.012959]
| | | fern#internal#viewer:init [redraw] 0.013682 [0.054117]
| | fern#internal#viewer:init [leave] 0.000626 [0.054743]
| fern_git_status#process#show_toplevel [leave] 0.031992 [0.031992]
fern_git_status#process#status [leave] 0.032681 [0.032681]
fern_git_status#investigator#s:complete_directories [enter]
fern_git_status#investigator#s:complete_directories [leave] 0.001482 [0.001482]
fern_git_status#investigator#s:prepend_toplevel [enter]
fern_git_status#investigator#s:prepend_toplevel [leave] 0.000483 [0.000483]
fern_git_status#investigator#s:dict_from_entries [enter]
fern_git_status#investigator#s:dict_from_entries [leave] 0.000763 [0.000763]
fern#helper:helper.async.redraw [enter]
| fern#renderer#nerdfont#s:render [enter]
| fern#renderer#nerdfont#s:render [leave] 0.001699 [0.001699]
| fern#helper:helper.async.remark [enter]
| fern#helper:helper.async.remark [leave] 0.001320 [0.001320]
fern#helper:helper.async.redraw [leave] 0.004212 [0.004212]
The most important profile part is
fern_git_status#process#status [leave] 0.032681 [0.032681]
fern_git_status#investigator#s:complete_directories [enter]
fern_git_status#investigator#s:complete_directories [leave] 0.001482 [0.001482]
fern_git_status#investigator#s:prepend_toplevel [enter]
fern_git_status#investigator#s:prepend_toplevel [leave] 0.000483 [0.000483]
fern_git_status#investigator#s:dict_from_entries [enter]
fern_git_status#investigator#s:dict_from_entries [leave] 0.000763 [0.000763]
from vim-fern-git-status.
Additionally, please provide the repository if possible. I've never faced such a performance issue even during development...
from vim-fern-git-status.
fern#internal#viewer:init [enter]
| fern#helper:helper.async.expand_node [enter]
| | fern#internal#node#expand [enter]
| | | fern#internal#node#children [enter]
| | | | fern#scheme#file#provider:provider_get_children [enter]
| | | | | fern#scheme#file#util#list_entries_find [enter]
| | | | | fern#scheme#file#util#list_entries_find [leave] 0.005208 [0.005208]
| | | | fern#scheme#file#provider:provider_get_children [leave] 0.009073 [0.009073]
| | | fern#internal#node#children [leave] 0.010499 [0.010499]
| | | fern#internal#node#expand [children] 0.011930 [0.011930]
| | | fern#internal#node#expand [sort] 0.002019 [0.013949]
| | | fern#internal#node#expand [extend] 0.000356 [0.014305]
| | fern#internal#node#expand [leave] 0.000344 [0.014649]
| | fern#helper:helper.async.update_nodes [enter]
| | | fern#internal#core#update_nodes [enter]
| | | | fern#internal#core#update_nodes [hidden] 0.001162 [0.001162]
| | | | fern#internal#core#update_nodes [include] 0.000695 [0.001857]
| | | | fern#internal#core#update_nodes [exclude] 0.000655 [0.002512]
| | | | fern#internal#core#update_nodes [let] 0.000345 [0.002857]
| | | | fern#internal#core#update_marks [enter]
| | | | | fern#internal#core#update_marks [resolve] 0.000553 [0.000553]
| | | | | fern#internal#core#update_marks [key] 0.000636 [0.001189]
| | | | | fern#internal#core#update_marks [filter] 0.000445 [0.001634]
| | | | fern#internal#core#update_marks [leave] 0.000329 [0.001963]
| | | fern#internal#core#update_nodes [leave] 0.003556 [0.006413]
| | fern#helper:helper.async.update_nodes [leave] 0.007421 [0.007421]
| fern#helper:helper.async.expand_node [leave] 0.024302 [0.024302]
| fern#internal#viewer:init [expand] 0.038133 [0.038133]
| fern#helper:helper.async.reveal_node [enter]
| | fern#internal#node#reveal [enter]
| | fern#internal#node#reveal [leave] 0.000338 [0.000338]
| | fern#helper:helper.async.update_nodes [enter]
| | | fern#internal#core#update_nodes [enter]
| | | | fern#internal#core#update_nodes [hidden] 0.001112 [0.001112]
| | | | fern#internal#core#update_nodes [include] 0.000648 [0.001760]
| | | | fern#internal#core#update_nodes [exclude] 0.000636 [0.002396]
| | | | fern#internal#core#update_nodes [let] 0.000339 [0.002735]
| | | | fern#internal#core#update_marks [enter]
| | | | | fern#internal#core#update_marks [resolve] 0.000544 [0.000544]
| | | | | fern#internal#core#update_marks [key] 0.000627 [0.001171]
| | | | | fern#internal#core#update_marks [filter] 0.000454 [0.001625]
| | | | fern#internal#core#update_marks [leave] 0.001424 [0.003049]
| | | fern#internal#core#update_nodes [leave] 0.003539 [0.006274]
| | fern#helper:helper.async.update_nodes [leave] 0.007232 [0.007232]
| fern#helper:helper.async.reveal_node [leave] 0.008526 [0.008526]
| fern#internal#viewer:init [reveal] 0.009029 [0.047162]
| fern#helper:helper.async.redraw [enter]
| | fern#renderer#nerdfont#s:render [enter]
| | fern#renderer#nerdfont#s:render [leave] 0.003153 [0.003153]
| | fern#helper:helper.async.remark [enter]
| | fern#helper:helper.async.remark [leave] 0.001988 [0.001988]
| | fern_git_status#process#show_toplevel [enter]
| | | fern_git_status#process#status [enter]
| | | fern#helper:helper.async.redraw [leave] 0.012717 [0.012717]
| | | fern#internal#viewer:init [redraw] 0.013575 [0.060737]
| | fern#internal#viewer:init [leave] 0.000898 [0.061635]
| fern_git_status#process#show_toplevel [leave] 0.028820 [0.028820]
fern_git_status#process#status [leave] 1.653307 [1.653307]
fern_git_status#investigator#s:complete_directories [enter]
fern_git_status#investigator#s:complete_directories [leave] 8.913275 [8.913275]
fern_git_status#investigator#s:prepend_toplevel [enter]
fern_git_status#investigator#s:prepend_toplevel [leave] 0.342945 [0.342945]
fern_git_status#investigator#s:dict_from_entries [enter]
fern_git_status#investigator#s:dict_from_entries [leave] 0.662596 [0.662596]
fern#helper:helper.async.redraw [enter]
| fern#renderer#nerdfont#s:render [enter]
| fern#renderer#nerdfont#s:render [leave] 0.002903 [0.002903]
| fern#helper:helper.async.remark [enter]
| fern#helper:helper.async.remark [leave] 0.001743 [0.001743]
fern#helper:helper.async.redraw [leave] 0.006173 [0.006173]
There is only one change in one file.
I can't provide repo because it's private.
from vim-fern-git-status.
fern_git_status#process#status [leave] 1.653307 [1.653307]
fern_git_status#investigator#s:complete_directories [leave] 8.913275 [8.913275]
These are slow. What happen if you set
let g:fern_git_status#disable_submodules = 1
let g:fern_git_status#disable_directories = 1
I can't provide repo because it's private.
OK 👍
from vim-fern-git-status.
Hello,
My Rails hobby application makes fern-git-status go very slow.
Steps to replicate:
-
git clone https://github.com/bluz71/platters
-
cd platters
-
yarn
(this is very important, must populatenode_modules
directory) -
Open (Neo)vim and then fern.vim drawer
-
Scroll up and down, and then open
node_modules
directory and then scroll up and down again
Scrolling becomes very slow.
It is the node_modules
directory that is causing the slowdown. If you delete it, or move it out of the way, fern.vim becomes fast again.
Note, node_modules
is in the .gitignore
file. But I suspect fern-git-status.vim
is not processing or respecting the project ignores.
If possible I would greatly suggest to process .gitignore
and not produce any git status
details for directories and files that are project ignored.
from vim-fern-git-status.
Thanks. That helps me a lot. I'll investigate it deeply later.
Well, if you think ignored files are the reason, could you try
let g:fern_git_status#disable_ignores = 1
in that case?
from vim-fern-git-status.
I tried let g:fern_git_status#disable_ignores = 1
, it makes no difference to performance.
As best as I can tell, disable_ignores
doesn't appear to do anything since untracked files are still being marked with [??]
if it is set to 1 or 0. Am I doing something wrong, or is the flag currently not working?
Ideally there should be two behaviours:
-
Anything in
.gitignore
should always be ignored by fern-git-status -
If
fern_git_status#disable_ignores
is set to 1 then untracked files should not be highlighted, hopefully saving some processing cycles
Cheers.
from vim-fern-git-status.
There are 4 different variables which disable different features.
https://github.com/lambdalisue/fern-git-status.vim/blob/master/autoload/fern_git_status.vim#L81-L84
The g:fern_git_status#disable_ignores
just disable checking ignored files (!!
) rather than untracked file (??
). If you'd like to disable untracked files, use g:fern_git_status#disable_untracked
instead.
Prob. It's better to investigate the raw command in https://github.com/lambdalisue/fern-git-status.vim/blob/master/autoload/fern_git_status/process.vim#L26-L34
I'll do it with your project (https://github.com/bluz71/platters) later.
from vim-fern-git-status.
Got it. git status --porcelain -uall --ignored
shows tons of files in node_modules
. I'll fix it
from vim-fern-git-status.
@timsofteng @bluz71 Please try #4
from vim-fern-git-status.
Performance of fix-performance
branch seems much improved compared with previous experience.
However, setting let g:fern_git_status#disable_untracked = 1
now results in no Git badge details being displayed.
My settings:
let g:fern_git_status#disable_ignored = 1
let g:fern_git_status#disable_untracked = 1
let g:fern_git_status#disable_submodules = 1
master
branch, notice the ??
and !!
badges, they should not be displayed:
fix-performance
branch, notice no badges at all even for the app
directory or Gemfile
which contains changes:
Git status badges are an issue at the moment.
from vim-fern-git-status.
Thanks. It seems --ignored=matching -uno
is not supported.
Note
" Wrong
let g:fern_git_status#disable_ignored = 1
" Correct
let g:fern_git_status#disable_ignores = 1
I'll probably change the variable name to _ignored
while the flag is --ignored
rather than --ignores
but for now _ignores
is correct.
from vim-fern-git-status.
@bluz71 Fixed and the variable name had renamed to _ignored
from vim-fern-git-status.
For clarity, which is the correct variable now? Is it g:fern_git_status#disable_ignored
?
from vim-fern-git-status.
Yes.
from vim-fern-git-status.
Ok, I have tested the latest fix-performance
branch and I am satisfied, performance is good and the ignored
flag is now being respected.
Hopefully @timsofteng will be able to test their private repository and report back.
from vim-fern-git-status.
@lambdalisue I'd tried everything what you recommend.
I had added this lines to my config
let g:fern_git_status#disable_submodules = 1
let g:fern_git_status#disable_directories = 1
let g:fern_git_status#disable_ignored = 1
Before I just updated all my plugins from vim-plug.
But it still too freezy. WIthout this plugin fern work pretty fast.
from vim-fern-git-status.
How long does time git status
take in your repo.
from vim-fern-git-status.
Did you use the fix-performance
branch of this plugin? The performance changes are not in the master
branch yet.
I recommend also disabling untracked checking:
let g:fern_git_status#disable_ignored = 1
let g:fern_git_status#disable_untracked = 1
let g:fern_git_status#disable_submodules = 1
from vim-fern-git-status.
Is it normal characters for tracking added files?
from vim-fern-git-status.
OK. Thanks you @timsofteng @bluz71 I'l merge it
from vim-fern-git-status.
Related Issues (17)
- Folders with changes, modified should override untracked/ignored HOT 3
- assets
- It would be nice to have `<Plug>(fern-action-git-status-toggle)` mapping HOT 3
- Custom styling instead of `[!!]`, `[ M]`, `[??]`, `[--]` HOT 6
- Performance tip: recommend `git config feature.manyFiles true` for large repositories HOT 4
- [Question] Is it possible to show the status before the file/directory name? HOT 4
- Support Windows HOT 9
- how do I install with vim-plug? HOT 2
- Does not work with msys2 git HOT 2
- Throws error on every start of `:Fern` HOT 1
- Error detected while processing VimEnter Autocommands for "*"..script /Users/xxx/.vim/vim-plug-in/fern-git-status.vim/autoload HOT 1
- Colors HOT 1
- Allow hiding git ignored files/directories HOT 1
- Add Icons HOT 1
- Colouring when first opening neovim HOT 1
- Windows msys2 not work HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-fern-git-status.