Freeze encodings module during startup

Aperta
#161,941 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
20/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

Read the discussion in #145278 and #156183 to understand why the encodings module was unfrozen and what additional checks are needed. The issue says a pull request is upcoming, so check the linked PR reference gh-161951 before starting. Done means the module can be frozen again with the checks in place and startup benchmarks can be compared with the figures in the issue.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

interpreter-core performance type-feature
Feature or enhancement

Freezing modules improves startup performance (#145278). The encodings module was unfozen in #156183, but with some additional checks we can freeze the module again.

Quick benchmark on Windows:

main frozen encodings
python -I -S -c pass 25.6 ms 22.3 ms
python -c pass 32.1 ms 28.4 ms
-X importtime, encodings cumulative 3.2 ms 0.9 ms

PR upcoming

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Linked PRs
  • gh-161951
Lingua principale
Python
Stelle
78.2k
Fork
36.6k
Merge medio
19h 57m
PR unite (30g)
630

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di python/cpython

Tutte le issue di python/cpython

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.