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

webob exceptions slow down over time

Aperta
#494 11 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

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

Direzione di ricerca

Reproduce the notfound benchmark with howareyou at 1,000, 10,000, 50,000, and 100,000 iterations. Start by profiling webob's exc.py, especially lazify, as the report identifies it as the dominant cost. Done means the performance no longer degrades sharply as iterations increase and lazify is no longer the overwhelming hotspot.

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

Descrizione

bug help wanted security

I just did some benchmarking on 'notfound' errors in Morepath. Morepath is slower at this than it should be, and it seems to get worse the more iterations I run per test. The benchmarking tool is howareyou:

https://github.com/faassen/howareyou

When I run the default amount of iterations (100,000) then I get these results:

howareyou -b notfound -f morepath
Benchmark : notfound
Frameworks: morepath
                ms     rps  tcalls  funcs
morepath     95624    1046     343    135

If I use half those iterations:

 howareyou -b notfound -f morepath -n 50000
Benchmark : notfound
Frameworks: morepath
                ms     rps  tcalls  funcs
morepath     25138    1989     343    135

if I use less iterations:

(py2)[faassen@cosmos howareyou]$ howareyou -b notfound -f morepath -n 10000
Benchmark : notfound
Frameworks: morepath
                ms     rps  tcalls  funcs
morepath      2433    4110     343    135

and even less iterations:

$ howareyou -b notfound -f morepath -n 1000
Benchmark : notfound
Frameworks: morepath, flask
                ms     rps  tcalls  funcs
morepath       225    4437     343    135

This isn't supposed to happen. When I profile, I find that lazify in webob's exc.py totally dominates performance::

   Ordered by: internal time
   List reduced from 147 to 10 due to restriction <10>

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
   100000   64.692    0.001   64.765    0.001 exc.py:191(lazify)
Lingua principale
Python
Stelle
395
Fork
40
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 morepath/morepath

Tutte le issue di morepath/morepath

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.