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

gh-103793: Defer formatting task name #103767

Merged
merged 14 commits into from
Apr 29, 2023

Commits on Apr 24, 2023

  1. Defer formatting task name

    The default task name is "Task-<counter>" (if no name is passed in during Task creation).
    This is initialized in `Task.__init__` (C impl) using string formatting, which can be quite slow.
    Actually using the task name in real world code is not very common, so this is wasted init.
    
    Let's defer this string formatting to the first time the name is read (in `get_name` impl),
    so we don't need to pay the string formatting cost if the task name is never read.
    itamaro committed Apr 24, 2023
    Configuration menu
    Copy the full SHA
    e8353cc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1822ff8 View commit details
    Browse the repository at this point in the history
  3. Add NEWS and whatsnew entries

    itamaro committed Apr 24, 2023
    Configuration menu
    Copy the full SHA
    74d0084 View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2023

  1. Configuration menu
    Copy the full SHA
    dbc7047 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2bb6c1e View commit details
    Browse the repository at this point in the history
  3. replace storing the task counter on task construction with just getti…

    …ng the next counter at lazy name generation
    itamaro committed Apr 25, 2023
    Configuration menu
    Copy the full SHA
    2efd376 View commit details
    Browse the repository at this point in the history
  4. Merge branch 'defer-task-name-formatting' of github.com:itamaro/cpyth…

    …on into defer-task-name-formatting
    itamaro committed Apr 25, 2023
    Configuration menu
    Copy the full SHA
    6cb321b View commit details
    Browse the repository at this point in the history
  5. remove redundant return

    itamaro committed Apr 25, 2023
    Configuration menu
    Copy the full SHA
    7cde290 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    4b50646 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a155190 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    fb2bd7f View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2023

  1. Switch back to original "assign task number at construction" but stor…

    …e the counter as PyLong for deferred formatting
    itamaro committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    41e9a59 View commit details
    Browse the repository at this point in the history
  2. Add test that using an explicit PyLong as task name does not accident…

    …ally trigger the deferred name formatting logic
    itamaro committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    712edf9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    592d44b View commit details
    Browse the repository at this point in the history