-
Notifications
You must be signed in to change notification settings - Fork 884
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repeated terminfo db opens #1800
Comments
How many times do we currently do this? The majority of the uses of the |
cli/log.rs seems to be particularly evident when I sample the stack traces |
I concur that the log functions reopen the terminal, we could |
Looks like |
Hah. Well I have a thing that makes it all better, just playing rust golf,
combined with road tripping. Will try to put it up today.
…On Mon, 29 Apr 2019, 19:57 Daniel Silverstone, ***@***.***> wrote:
Looks like term is unmaintained and we should move away from it anyway --
#1818 <#1818> is related to
that.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1800 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADZ7XQTOW3GESBSB6JZESDPS2S5LANCNFSM4HIAHZYA>
.
|
Ok, have looked at termcolor; (ug the spelling :( ). It's no different in terms of primary public API - in that it still returns a thing we have to manage ourselves to avoid repeated requerying of the underlying context; it does appear to do a somewhat lighterweight job of that - by virtue of not honouring terminfo at all. |
Fixed with 1820. |
Problem
rustup is opening the terminfo db repeatedly, which is wasteful.
Steps
Run rustup under strace / process monitor; debug builds are useful to get good stacks :).
This shows up multiple times
A sample stack fragment
Possible Solution(s)
The term library does no caching of the environment; it looks likes complete minimisation requires retaining the terminfo db and use term::terminfo::TerminfoTerminal new_with_terminfo rather than the stdout and stderr helpers.
A probably fine intermediate step is to open stdout and stderr just once each and manage those resources.
Notes
This is in git as of 373448b
Output of
rustup --version
:Output of
rustup show
:The text was updated successfully, but these errors were encountered: