Skip to content

Accelerate slow examples #21598

@adrinjalali

Description

@adrinjalali

These examples take quite a long time to run, and they make our documentation CI fail quite frequently due to timeout. It'd be nice to speed the up a little bit.

To contributors: if you want to work on an example, first have a look at the example, and if you think you're comfortable working on it and have found a potential way to speed-up execution time while preserving the educational message of the example, please mention which one you're working on in the comments below.

Please open a dedicated PR for each individual example you have a found fix for (with a new git branch branched off of main for each example) to make the review faster.

Please focus on the longest running examples first (e.g. 30s or more). Examples that run in less than 15s are probably fine.

Please also keep in mind that we want to keep the example code as simple as possible for educational reasons while preserving the main points expressed in the text of the example valid and well illustrated by the result of the execution (plots or text outputs).

Finally, we expect that some examples cannot really be accelerated while preserving their educational value (integrity of the message and the simplicity of the code). In this case, we might decide to keep them as they are if they last less than 60s.

To maintainers: I'm running a script which automatically updates the following list with connected PRs and "done" checkboxes, no need to updated them manually.

Examples to Update

Metadata

Metadata

Assignees

No one assigned

    Labels

    Meta-issueGeneral issue associated to an identified list of tasksgood first issueEasy with clear instructions to resolve

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions