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

Introduce EventLog BufferSize #169

Open
tchaton opened this issue Aug 16, 2023 · 1 comment
Open

Introduce EventLog BufferSize #169

tchaton opened this issue Aug 16, 2023 · 1 comment

Comments

@tchaton
Copy link

tchaton commented Aug 16, 2023

Hey there,

Thanks for this nice framework.

I would like to request the addition of a mechanism to limit the size of the EventLog to tail the latest ones in memory.

This can be done by patching the EventLog as follows:

	if len(stream.Eventlog) >= Limitsize {
		L := len(stream.Eventlog)
		stream.Eventlog =stream.Eventlog[L-Limitsize : L-1]
	}
@aywan
Copy link

aywan commented Sep 22, 2023

Hi!
Same problem, current implementation of EventLog is memory leaking)
I think some kind of circular/ring buffer be better, than copy and extend slice every time.

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

No branches or pull requests

2 participants