Skip to content

Conversation

@hbrunn
Copy link
Member

@hbrunn hbrunn commented Jul 17, 2018

without this, you'll have to wait unnecessarily long for the wizard to start in case there are a lot of uninstallable modules to purge, because purging causes a full registry reload, which costs a lot of time. Doing it in bulk will cause only one registry reload for all modules.

@hbrunn hbrunn added this to the 10.0 milestone Jul 17, 2018
@api.model
def find(self):
res = []
purge_lines = self.env['cleanup.purge.line.module']
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it worth adding .browse() for clarity (empty recordset)?
👍 I have experienced slow processes when cleaning databases, maybe it was the cause.

Copy link
Member Author

Choose a reason for hiding this comment

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

I used to add the .browse([]), but meanwhile I see this used as idiom for an empty recordset very often, so if you don't insist, I'd like to keep it this way

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't, it was a coding-style question!

Copy link

@CasVissers-360ERP CasVissers-360ERP left a comment

Choose a reason for hiding this comment

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

LGTM functional test

@pedrobaeza pedrobaeza merged commit 6c6e022 into OCA:10.0 Oct 10, 2018
SiesslPhillip pushed a commit to grueneerde/OCA-server-tools that referenced this pull request Nov 20, 2024
Syncing from upstream OCA/server-tools (8.0)
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.

4 participants