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

Separate stanza parsing from database loading #373

Open
guusdk opened this issue Feb 16, 2024 · 0 comments
Open

Separate stanza parsing from database loading #373

guusdk opened this issue Feb 16, 2024 · 0 comments

Comments

@guusdk
Copy link
Member

guusdk commented Feb 16, 2024

The constructor of ArchivedMessage attempts to parse a stanza. This can be a resource-intensive operation.

ArchivedMessage instances are typically created in bulk while iterating over database content.

The resource-intensive stanza parsing should not prevent the database resources from being released, as this keeps those resources from being available for other database operations.

To improve performance, modify the code in such a way that the optional stanza that is part of a message is not parsed in the constructor.

guusdk added a commit to guusdk/openfire-monitoring-plugin that referenced this issue 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 added a commit to guusdk/openfire-monitoring-plugin that referenced this issue Nov 22, 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 added a commit to guusdk/openfire-monitoring-plugin that referenced this issue Nov 22, 2024
By not parsing database content immediately, this parsing can be done after the database connection has been released. This should reduce resource contention.
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

1 participant