Skip to content
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

buffer messages before writing to file #13

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

But2ene
Copy link

@But2ene But2ene commented Dec 12, 2017

Add two properties to the logging class
bufferMessages : The first is a cell array that contains messages to be
written.
bufferCursor_ is an integer that points to next cell to write in
bufferMessages_

During logging, messages are added to buffer. Once it's full, log lines
are written on file.

This new feature have no impact on logging on console.

A new method called setBufferingSize was created to change buffer size, on the model of the
others methods

Add two properties to the logging class
bufferMessages : The first is a cell array that contains messages to be
written.
bufferCursor_ is an integer that points to next cell to write in
bufferMessages_

During logging, messages are added to buffer. Once it's full, log lines
are written on file.

This new feature have no impact on logging on console.

A new method called setBufferingSize was created to change buffer size, on the model of the
others methods
@But2ene
Copy link
Author

But2ene commented Dec 12, 2017

Hello,
here is a PR for a new feature to buffer messages before writing them,
it should give better performances in some cases.

I hope you find the style of code respected in this commit, and you find it usefull.
If so, I would be pleased if you accept it, so others that find this link on Matlab FileExchange can use it.

@dpo
Copy link
Member

dpo commented Dec 29, 2017

Thank you. Could you show in what circumstances this improves performance? I expect Matlab to already implement some sort of buffering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants