Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[BUG] Performance improvement for non-uvicorn ASGI environments

Aperta
#620 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
python

Direzione di ricerca

Inizia in fasthtml/core.py e verifica come uvicorn viene importato e utilizzato da serve(). Verifica il comportamento dell’importazione con l’esempio fasthtml dell’issue in un ambiente ASGI non-uvicorn; l’attività è completata quando l’importazione di fasthtml.core non carica più né riesporta uvicorn, a meno che non venga utilizzato serve().

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

Descrizione

bug

Describe the bug

fasthtml/core.py file imports uvicorn even though it's only used for serve() calls. For AWS Lambda this causes worse cold starts than if the uvicorn was imported inline of serve().

Minimal Reproducible Example

# Your code here
from fasthtml.core import *
uvicorn # uvicorn is imported and re-exported, even though it's only used in `serve()`

Expected behavior

I'd expect that users of other ASGI serving methods would not need to load uvicorn at runtime unless they are using it.

Environment Information
Please provide the following version information:

  • fastlite version: 0.1.1
  • fastcore version: 1.7.28
  • fasthtml version: 0.10.3

Confirmation
Please confirm the following:

  • I have read the FAQ (https://docs.fastht.ml/explains/faq.html)
  • I have provided a minimal reproducible example
  • I have included the versions of fastlite, fastcore, and fasthtml
  • I understand that this is a volunteer open source project with no commercial support.

Additional context
Add any other context about the problem here.

Screenshots
If applicable, add screenshots to help explain your problem.

Lingua principale
Jupyter Notebook
Stelle
7.1k
Fork
325
Merge medio
8g 9h
PR unite (30g)
2

Preparare l'ambiente

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 AnswerDotAI/fasthtml

Tutte le issue di AnswerDotAI/fasthtml

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.