Skip to content

Logger causing large loop delay every 220 seconds when storing data in memory #513

Description

@Katharine-Walters

Describe the bug
When the buffer_size is set very large (>100000) and flush_buffer is not called every loop, there is a large (~200ms) delay in the softrealtimeloop every ~220 seconds. I want to keep all of the logged data in memory until the loop is killed to avoid non-deterministic delays due to low-level .csv writing.

To Reproduce
Set the buffer_size very large and call flush_buffer only when the loop is killed. Save the current time on every loop and observe a large delay every ~220 seconds.

Expected behavior
I would expect the logged data to be saved in memory until flush_buffer is called upon controller exit.

Screenshots

Image

Additional context
The function "flush_buffer" is not being called under the hood when the loop delay is occurring. I confirmed that the function is only being called on exit, as desired.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions