Skip to content

Conversation

@guusdk
Copy link
Member

@guusdk guusdk commented Feb 16, 2024

By not parsing database content immediately, this parsing can be done after the database connection has been released. This should reduce resource contention.

@guusdk
Copy link
Member Author

guusdk commented Nov 22, 2024

Rebased.

@guusdk guusdk force-pushed the 373_stanza-parsing branch from d0fa954 to c0f0fe6 Compare November 22, 2024 20:17
@akrherz
Copy link
Member

akrherz commented Nov 22, 2024

Could there be memory allocation concerns with the database query filling up string stanzas to later parse? The previous code may be allowing this to throttle itself by having to iterate over the database result as the database result is materialized?

@guusdk
Copy link
Member Author

guusdk commented Nov 22, 2024

That's possible, but I wonder if it is wildly different from the amount of memory being consumed by the parsed XMPP stanzas that were constructed 'on the fly' prior to this change.

After this change, those stanzas are still being generated. Whenever a raw string is being converted into a stanza, that string is deallocated. I'm guessing that the total memory consumption is roughly the same.

By not parsing database content immediately, this parsing can be done after the database connection has been released. This should reduce resource contention.
@guusdk guusdk force-pushed the 373_stanza-parsing branch from c0f0fe6 to 754efed Compare January 7, 2025 13:32
@guusdk guusdk merged commit b714ee9 into igniterealtime:main Jan 7, 2025
1 check passed
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