Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API startup performance #1458

Closed
metemaddar opened this issue Aug 20, 2022 · 2 comments
Closed

API startup performance #1458

metemaddar opened this issue Aug 20, 2022 · 2 comments
Assignees
Milestone

Comments

@metemaddar
Copy link
Contributor

metemaddar commented Aug 20, 2022

Problem

When we get more APIs the startup slows down dramatically. This wastes much time while API development.

Solution

As @EPajares mentioned there is a patch at tiangolo/fastapi#4645 for this that helps to improve reload time.
It's a simple Patch with 3 lines changes.
Maybe while this patch has not been applied, we can add it manually to the project.

@metemaddar
Copy link
Contributor Author

Problem

When we start the dev container for fastapi, it falls back to the main docker-compose and starts all the services.

Solution

We can disable other services by the devcontainer's keyword: runServices (ref) and add just api to it.
This will also run the db as it is a dependency of api.

@EPajares EPajares added this to the v1.3 milestone Aug 29, 2022
@EPajares EPajares modified the milestones: v1.3, v1.4 Nov 2, 2022
@metemaddar
Copy link
Contributor Author

Done by patching the fastapi at devcontainer. And also the runServices limited for api development.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants