Major Performance issue even with new caching?
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 38/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- openapi, php
- Ambito
- api, performance
Direzione di ricerca
Inizia con la riproduzione minima su github.com/lextira/openapi-parse-test ed esegui test.php sul fork basato su v1.4 e sulla release ufficiale v1.6. Analizza il percorso di risoluzione dei riferimenti e il comportamento della cache, utilizzando la specifica OpenAPI collegata come carico di lavoro. Il lavoro è completato quando il percorso v1.6 non mostra più la regressione di parsing segnalata rispetto al fork.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hi @cebe
Almost 2 years ago we had a rather big issue with the performance for parsing an API-spec, where all components were store in another (the same) file. It took a couple of minutes to process. My collegue then proposed this PR #65
We ended up using this fork for the last two years now. This week I'm updating dependencies, and having seen that you merged #67 made me realize, that I can finally get rid of our fork.
However, running our test-suite after the update was rather painful: Instead of ~1s to parse our specification, like with our fork, it now took ~30s. I spent a couple of hours analyzing, but I couldn't find the issue. It looks like resolving references is painfully slow, it seems to take 100-300ms for each reference. Clearly, this was much faster in version 1.4, where our fork originates.
Therefore, I hope you can find a minute to look into it as well. I prepared a minimal test setup:
$ git clone https://github.com/lextira/openapi-parse-test
$ composer update
# now we have a composer install with our fork, see https://github.com/lextira/openapi-parse-test/blob/master/composer.json
$ php test.php
Start Reading...
Read took 1248 miliseconds!
Parsed file is 791837 characters long.
$ git checkout with-openapi-1.6
$ composer update
# new we are at the latest release of the official repository
$ php test.php
Start Reading...
Read took 37302 miliseconds!
Parsed File is 791837 characters long.
So with v1.6, reading the exact same file from the exact same URL takes almost 30 times longer than with v1.4 (and our custom cache implementation, which is very similar to your implemented cache now). For context, the specification used for the test is our official API documentation and can be found here: https://docs.lexgate.ch/api/
- Lingua principale
- PHP
- Stelle
- 500
- Fork
- 99
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cebe/php-openapi
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
cebe/php-openapi#250 ·
-
BC break in 1.8 Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
cebe/php-openapi#247 · 1 commento · 1 reazione ·
-
php 8.4 deprecations Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
cebe/php-openapi#245 · 3 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
cebe/php-openapi#242 · 6 commenti · 1 reazione ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 55/100
cebe/php-openapi#238 ·
Tutte le issue di cebe/php-openapi
Issue simili
-
tooling
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
UX
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
ProfessionalWiki/NeoWiki#1525 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
bug customer-reported
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
MagnaCapax/PMSS#949 ·
-
responsive-media kses allow-list strips clipPathUnits, collapsing objectBoundingBox clip paths Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
Automattic/static-site-importer#1829 ·