changed the title gh-NNNNN: Defer formatting task namegh-103793: Defer formatting task name
Closed
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.
marked this pull request as ready for review
…ng the next counter at lazy name generation
…on into defer-task-name-formatting
deleted the defer-task-name-formatting branch
added a commit to carljm/cpython that referenced this pull request
Merged