print delta startup timing with DELTA_DEBUG_TIMING=1 env var #1910
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If this env var is set, on exit delta will print how long reading the config files, setting up the tty, querying the calling process and painting the first line took, in absolute ms from the start of
main()
.Note: The process time reports when it was first requested, not when it finished. This may be much later than the first paint.
E.g. on
git show
:delta timings (ms after start): tty setup: 2.3 ms, read configs: 6.0 ms, query processes: 26.1 ms, first paint: 10.1
These measurements are cheap and could always be taken. If a certain component is slow (regularly, but where to store that information?), then print a notice on exit, e.g. "Your terminal seems slow, maybe set
--light
in your config".