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

Micro-optimisations from the Wellcome fork #1808

Conversation

alexwlchan
Copy link
Contributor

Part of archivematica/Issues#1578

I've been reviewing the changes in our fork of artefactual/archivematica. After removing changes that are already merged (OIDC/zipped bag) or changes which won't be merged (Wellcome-specific bits), this is what was left. It's not especially substantial, but seemed a shame to let it go to waste.

@replaceafill
Copy link
Member

Thank you @alexwlchan. This looks good.

Could you please target the qa/1.x branch in this pull request when you have a chance?

alexwlchan and others added 4 commits February 28, 2023 23:49
*   We run `if file_type in DERIVATIVE_TYPES` when we first validate;
    checking for set inclusion is faster than a tuple -- O(1), not O(n).

    In practice it's unlikely to make a noticeable difference for a
    collection of two elements, but it sets precedent for elsewhere.

*   Rather than accumulating the results of _execute_rule_command() in a
    list, inspect them one-by-one.

    This won't have any effect on a file that passes validation, but if
    a file fails validation it'll exit on the first failure, and skip
    running unnecessary checks.
We've already looked up the PREMIS object on L61; we don't gain anything
from retrieving it again.
@alexwlchan alexwlchan changed the base branch from stable/1.13.x to qa/1.x February 28, 2023 23:49
@alexwlchan
Copy link
Contributor Author

Could you please target the qa/1.x branch in this pull request when you have a chance?

Done!

@replaceafill replaceafill added the AMAUAT Issues relating to the improvement of the AM Automated Acceptance tests label Mar 1, 2023
@replaceafill
Copy link
Member

Thank you @alexwlchan! I rebased your branch on top of the current qa/1.x branch, fixed a linting problem and squashed the commits. It's been merged in 329e043

@replaceafill replaceafill removed the AMAUAT Issues relating to the improvement of the AM Automated Acceptance tests label Mar 7, 2023
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.

None yet

2 participants