Skip to content

allow pre-allocation of the buffer in LogStreamBuf#2791

Closed
killerbot242 wants to merge 1 commit intopocoproject:developfrom
killerbot242:LogStreamBufPreAllocation2
Closed

allow pre-allocation of the buffer in LogStreamBuf#2791
killerbot242 wants to merge 1 commit intopocoproject:developfrom
killerbot242:LogStreamBufPreAllocation2

Conversation

@killerbot242
Copy link
Copy Markdown

GOAL : allowing pre-allocation of the buffer in LogStreamBuf

RATIONALE:
Like any iostream buffer, LogStreamBuf comes with an unknown buffer space pre-allocated. When the logging messages are long, it can induce a number of realloc. Pre-allocating the buffer allows to avoid those expensive reallocations. This is important when the logging happens often (inside a loop that is repeated a lot).

@killerbot242
Copy link
Copy Markdown
Author

killerbot242 commented Sep 22, 2019

I had a look at the failing unit test :

testIndex:

!!!FAILURES!!!

Runs: 829 Failures: 0 Errors: 1

There was 1 error:

1: N7CppUnit10TestCallerI15ExpireCacheTestEE.testAccessExpireN

"N4Poco20NullPointerExceptionE: Null pointer: "

in "<unknown>", line -1

failed=Foundation

I am unable to relate this to my pull request, do you have any ideas ????

@obiltschnig obiltschnig self-assigned this Sep 23, 2019
@obiltschnig obiltschnig added this to the Release 1.10.0 milestone Sep 23, 2019
@killerbot242
Copy link
Copy Markdown
Author

Hi,
does something need to be changed for this to be acceptable. Originally it was labeled to be part of 1.10, but then it was closed and was not postponed to a further release neither.

@obiltschnig
Copy link
Copy Markdown
Member

Sorry, that was an unintended side effect of renaming the develop branch, which unfortunately closed all open PRs.
To speed things up, please re-submit the PR against the new devel branch.

@obiltschnig
Copy link
Copy Markdown
Member

merged into 1.10.1

@obiltschnig obiltschnig mentioned this pull request Feb 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants