Skip to content

Commit ba121f0

Browse files
authored
document performance issues and add to bug report template (#1111)
1 parent bd23c88 commit ba121f0

File tree

3 files changed

+30
-4
lines changed

3 files changed

+30
-4
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ body:
55
- type: markdown
66
attributes:
77
value: |
8-
Before reporting: search [existing issues](https://github.com/kyazdani42/nvim-tree.lua/issues) and make sure that nvim-tree is updated to the latest version.
8+
Before reporting: search [existing issues](https://github.com/kyazdani42/nvim-tree.lua/issues) and make sure that nvim-tree is updated to the latest version. If you are experiencing performance issues, please [enable profiling](https://github.com/kyazdani42/nvim-tree.lua#performance-issues) and attach the logs.
99
- type: textarea
1010
attributes:
1111
label: "Description"

README.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,10 +334,37 @@ You can toggle the help UI by pressing `g?`.
334334

335335
## Diagnostic Logging
336336

337-
You may enable diagnostic logging and a file `nvim-tree-HH:MM:SS-username.log` will be created in `$XDG_CACHE_HOME/nvim`, usually `~/.cache/nvim`, containing logs from that nvim session. See `:help nvim-tree.log`.
337+
You may enable diagnostic logging and a file `nvim-tree.log` will be created in `$XDG_CACHE_HOME/nvim`, usually `~/.cache/nvim`, containing logs from that nvim session. See `:help nvim-tree.log`.
338338

339339
The files may become large and numerous, so it is advised to turn on logging to diagnose an issue or while reporting a bug, then turn it off.
340340

341+
## Performance Issues
342+
343+
If you are experiencing performance issues with nvim-tree.lua, you can enable profiling in the logs. It is advisable to enable git logging at the same time, as that can be a source of performance problems.
344+
345+
```lua
346+
log = {
347+
enable = true,
348+
truncate = true,
349+
types = {
350+
git = true,
351+
profile = true,
352+
},
353+
},
354+
```
355+
356+
Please attach `$XDG_CACHE_HOME/nvim/nvim-tree.log` if you raise an issue.
357+
358+
*Performance Tips:*
359+
360+
* If you are using fish as an editor shell (which might be fixed in the future), try set `shell=/bin/bash` in your vim config.
361+
362+
* Try manually running the git command (see the logs) in your shell e.g. `git --no-optional-locks status --porcelain=v1 --ignored=matching -u`.
363+
364+
* Huge git repositories may timeout after the default `git.timeout` of 400ms. Try increasing that in your setup if you see `[git] job timed out` in the logs.
365+
366+
* Try temporarily disabling git integration by setting `git.enable = false` in your setup.
367+
341368
## Screenshots
342369

343370
![alt text](.github/screenshot.png?raw=true "kyazdani42 tree")

doc/nvim-tree-lua.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,7 @@ Here is a list of the options available in the setup call:
479479
*nvim-tree.log*
480480
|log|: configuration for diagnostic logging
481481

482-
- |log.enable|: enable logging to a file `nvim-tree-HH:MM:SS-username.log`
483-
in $XDG_CACHE_HOME/nvim
482+
- |log.enable|: enable logging to a file `$XDG_CACHE_HOME/nvim/nvim-tree.log`
484483
type: `boolean`
485484
default: `false`
486485

0 commit comments

Comments
 (0)