8000 Optimization of getFormattedTime in ~two times by VishtakAlexey · Pull Request #321 · log4cplus/log4cplus · GitHub
[go: up one dir, main page]

Skip to content

Optimization of getFormattedTime in ~two times #321

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

Merged
merged 1 commit into from
Jun 28, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/timehelper.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,8 @@ Time::getFormattedTime(const log4cplus::tstring& fmt_orig, bool use_gmtime) cons
// without changing errno.
std::size_t const buffer_size_max
= (std::max) (static_cast<std::size_t>(1024), buffer_size * 16);

buffer_size = (std::max) (buffer_size, gft_sp.buffer.capacity());

do
{
Expand Down
0