Skip to content

Conversation

alexander-beedie
Copy link
Collaborator

@alexander-beedie alexander-beedie commented Nov 15, 2023

Ref: #12094 (comment).

Improves the test in several ways:

  • Adds an up-front .py.pyc step (fast, only runs once).
  • Factors-out (and fixes!) the "cumulative_time" sort that chooses the fastest run.
  • Early-exits from the test as soon as an import run meets the max allowed time.

Should be much more reliable now.

(Fastest time I saw while testing was ~0.059 secs, so initial import remains extremely fast).

@github-actions github-actions bot added internal An internal refactor or improvement python Related to Python Polars labels Nov 15, 2023
Copy link
Contributor

@stinodego stinodego left a comment

Choose a reason for hiding this comment

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

Thanks! <3

@stinodego stinodego merged commit 65bfa48 into pola-rs:main Nov 15, 2023
@stinodego stinodego changed the title test(python): improved import polars timing test; now much more consistent/reliable test(python): Improved import polars timing test; now much more consistent/reliable Nov 15, 2023
@alexander-beedie alexander-beedie deleted the rework-import-timings-test branch November 15, 2023 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal An internal refactor or improvement python Related to Python Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants