cebe / cebe/php-openapi

My experience using the lib. Inputs for performance improvement

Ouverte
#105 1 commentaire 0 réactions 1 personne assignée Réclamée par @cebe Voir sur GitHub
enhancement needs investigation
Langage dominant
PHP
Étoiles
500
Forks
99
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

First of all, Thanks for this amazing library.

I am using this library and would like to share experience that will give you data when you refactor code to improve performance

- When `$openapi` object is initialised by reading spec file it is taking significant time that can be reduced (`$openapi = Reader::readFromJsonFile(realpath('openapi_spec.json'));`)
- When I `print_r` a Schema object (`cebe\openapi\spec\Schema`) it takes a lot of time, browser crashes sometimes. (Workaround print_r property directly `echo $schema->title`)
- Above issue also occurs when I try to print other object such as MediaType
- php.ini: `max_execution_time` & `memory_limit` are needed to increase. If possible, changes can be made to be within limit of PHP defaults

Note: I have not done concrete profiling. This are just my primary observation while using the lib

I will share further experiences when I go come across any

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.