-
Notifications
You must be signed in to change notification settings - Fork 38.7k
util: Explain why the path is cached #16300
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
Conversation
fad675c to
fa69c3e
Compare
ryanofsky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK fa69c3e. Good cleanup. Previous comment was confusing, and definitely not helpful if outdated.
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
|
ACK fa69c3e. |
|
Fair enough, I liked the ambitiousness of getting rid of this code, but, this is a clear and non-controversial improvement |
fa69c3e util: Explain why the path is cached (MarcoFalke) Pull request description: The rationale for caching the datadir is given as ``` // This can be called during exceptions by LogPrintf(), so we cache the // value so we don't have to do memory allocations after that. ``` Since 8c2d695, the debug log location is actually cached itself in `m_file_path`. So explain that the caching is now only used to guard against disk access on each call. (See also #16255) ACKs for top commit: promag: ACK fa69c3e. laanwj: ACK fa69c3e ryanofsky: utACK fa69c3e. Good cleanup. Previous comment was confusing, and definitely not helpful if outdated. Tree-SHA512: 02108c90026d6d7c02843aaf59a06b4e1fa63d5d4378bb7760f50767efc340dc94c259bf7afb32fa4d47952b48a4e91798d1e0ddc1b051d770405e078636793a
Summary: This is a backport of Core [[bitcoin/bitcoin#16300 | PR16300]] Test Plan: make check Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Differential Revision: https://reviews.bitcoinabc.org/D5774
Summary: This is a backport of Core [[bitcoin/bitcoin#16300 | PR16300]] Test Plan: make check Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Differential Revision: https://reviews.bitcoinabc.org/D5774
fa69c3e util: Explain why the path is cached (MarcoFalke) Pull request description: The rationale for caching the datadir is given as ``` // This can be called during exceptions by LogPrintf(), so we cache the // value so we don't have to do memory allocations after that. ``` Since 8c2d695, the debug log location is actually cached itself in `m_file_path`. So explain that the caching is now only used to guard against disk access on each call. (See also bitcoin#16255) ACKs for top commit: promag: ACK fa69c3e. laanwj: ACK fa69c3e ryanofsky: utACK fa69c3e. Good cleanup. Previous comment was confusing, and definitely not helpful if outdated. Tree-SHA512: 02108c90026d6d7c02843aaf59a06b4e1fa63d5d4378bb7760f50767efc340dc94c259bf7afb32fa4d47952b48a4e91798d1e0ddc1b051d770405e078636793a
The rationale for caching the datadir is given as
Since 8c2d695, the debug log location is actually cached itself in
m_file_path.So explain that the caching is now only used to guard against disk access on each call. (See also #16255)