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

[performance bug] Fix Sequence::clear() #328

Merged
merged 1 commit into from
Aug 12, 2023

Conversation

Crydsch
Copy link
Contributor

@Crydsch Crydsch commented Aug 12, 2023

Hey, I noticed a performance degradation over time
when repeatedly calling Sequence::eval(..) or Sequence::evalAsync(..).

Both functions first clear the currently recorded operations by calling Sequence::clear(),
then record and actually evaluate the new operation.

The problem is - Sequence::clear() never actually clears the operations.
This leads to operations just adding up.

This PR simply adds the missing clear call.
I guess this was just an oversight...
I only noticed this problem only in a compute heavy, long running process.

Signed-off-by: crydsch <crydsch@lph.zone>
@axsaucedo
Copy link
Member

axsaucedo commented Aug 12, 2023

Great fix, thank you! Woudl be great to add a unit test for this if possible

@axsaucedo axsaucedo merged commit a8feda4 into KomputeProject:master Aug 12, 2023
8 checks passed
@Crydsch Crydsch deleted the fix_sequence_clear branch August 16, 2023 11:00
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.

2 participants