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

[3.x] Make MessageQueue growable #75527

Merged
merged 1 commit into from
Apr 11, 2023

Conversation

lawnjelly
Copy link
Member

  • Uses simple vector resizing (po2)
  • Uses pair of read and write buffers

3.x version of #65740
See that PR for more details.

* Uses simple vector resizing (po2)
* Uses pair of read and write buffers
@lawnjelly lawnjelly requested review from a team as code owners March 31, 2023 09:36
@lawnjelly lawnjelly added this to the 3.x milestone Mar 31, 2023
@lawnjelly
Copy link
Member Author

We discussed the message queue PRs today and @reduz is fine with this one for 3.x, I've tested it quite a bit now, but if e.g. @KoBeWi or @RandomShaper or @akien-mga want to give a second look that would be welcome, so we can get approved and in for 3.6. 👍

reduz: It won't reduce. It stays at maximum size. I didn't use yours because I have some special requirements for it, mostly that I need to have one of those per thread group and they need to share the page pool for performance.
but we can merge yours for 3.x if you want

@@ -1190,7 +1190,7 @@
</member>
<member name="memory/limits/command_queue/multithreading_queue_size_kb" type="int" setter="" getter="" default="256">
</member>
<member name="memory/limits/message_queue/max_size_kb" type="int" setter="" getter="" default="4096">
<member name="memory/limits/message_queue/max_size_mb" type="int" setter="" getter="" default="32">
Copy link
Member

Choose a reason for hiding this comment

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

Should we keep this in kB so we don't break compat on the property name?

Copy link
Member Author

@lawnjelly lawnjelly Apr 11, 2023

Choose a reason for hiding this comment

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

I don't think breaking compatibility here matters all that much, as the new version grows / shrinks on demand, so the max value can be higher. Any old values stored will be overly low for new version, so in a way it makes more sense to change this name.

The default of 32 megs I think came from reduz PR, but it seems reasonable even on mobile. In most situations it will only use a few Kb, and peak only during e.g. loading. It's possible we could use a slightly smaller peak for mobile, but this kind of thing should become obvious with testing.

@akien-mga akien-mga merged commit 632a544 into godotengine:3.x Apr 11, 2023
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

3 participants