Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat(internal): Added RecycledQueue class #1864

Merged
merged 12 commits into from
Aug 26, 2022
Merged

feat(internal): Added RecycledQueue class #1864

merged 12 commits into from
Aug 26, 2022

Conversation

st-pasha
Copy link
Contributor

Description

This PR introduces RecycledQueue class, which is similar to a regular FIFO Queue except that it supports recycling of objects instead of having to create/delete them all the time.

This class will be used to build more efficient component lifecycle queues.

Checklist

  • The title of my PR starts with a Conventional Commit prefix (fix:, feat:, docs: etc).
  • I have read the Contributor Guide and followed the process outlined for submitting PRs.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation in docs and added dartdoc comments with ///.

Breaking Change

  • No, this is not a breaking change.

Copy link
Member

@spydon spydon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm! Not too fond of the utils directory becoming a place with a wide mix of things in it though, maybe the two existing files in there could be put in some math directory, and this one be placed somewhere else or having the utils directory renamed?

@st-pasha
Copy link
Contributor Author

and this one be placed somewhere else or having the utils directory renamed?

To me, "utils" sounds a bit like "miscellaneous" (but easier to spell :).
So, where would you suggest the RecycledQueue class be located?

@spydon
Copy link
Member

spydon commented Aug 24, 2022

To me, "utils" sounds a bit like "miscellaneous" (but easier to spell :). So, where would you suggest the RecycledQueue class be located?

Indeed, that's what I'd like to avoid, to not have a place where non-related files live.
Maybe a new directory in components called lifecycle? And then maybe the LifecycleManager could be moved there too?

@st-pasha
Copy link
Contributor Author

I created the directory components/core then, seems like it would have a larger scope than mere lifecycle.

@spydon
Copy link
Member

spydon commented Aug 26, 2022

I created the directory components/core then, seems like it would have a larger scope than mere lifecycle.

Very nice!

@spydon spydon requested a review from a team August 26, 2022 08:42
@spydon spydon enabled auto-merge (squash) August 26, 2022 16:40
@spydon spydon merged commit 9457e38 into main Aug 26, 2022
@spydon spydon deleted the ps.recycled_queue branch August 26, 2022 16:43
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants