Skip to content

local_ltiprovider_cron needs optimizing #18

@hello-josh

Description

@hello-josh

There are items being checked in a loop that could be filtered in the select statements for users. For instance, serviceurl and sourceid being empty [1] could be filtered in the user select [2]. Also multiple field updates should be handled in a single update statement [3]

[1] https://github.com/jleyva/moodle-local_ltiprovider/blob/master/lib.php#L234
[2] https://github.com/jleyva/moodle-local_ltiprovider/blob/master/lib.php#L230
[3] https://github.com/jleyva/moodle-local_ltiprovider/blob/master/lib.php#L294

Otherwise the processing of cron becomes exponentially slower as you expose more items via lti provider. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions