Skip to content

We can skip a lot of database operations in purge_history if we have no events to purge #13417

@matrixbot

Description

@matrixbot

This issue has been migrated from #13417.


In purge_history we check how many events we need to delete, but if that number is 0 (which can happen frequently on inactive rooms with room retention enabled) we still proceed to perform all of the database operation as if there was anything to purge. We could just skip all the way down to dropping the temporary table, clearing caches and returning.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions