igniterealtime/openfire-monitoring-plugin

Separate stanza parsing from database loading

Opened this issue · 0 comments

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.