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

Use more django orm features to speed up classes retrieval #93

Merged
merged 1 commit into from
Aug 7, 2024

Conversation

tomaspalma
Copy link
Member

@tomaspalma tomaspalma commented Aug 7, 2024

It uses the prefetch_related feature in django to speedup class retrieval.

It also prioritizes the use of map instead of for due to its speed advantage.

It decreased the time by 1 - 1.5 seconds.

@tomaspalma tomaspalma self-assigned this Aug 7, 2024
@tomaspalma tomaspalma requested a review from a team August 7, 2024 11:11
@tomaspalma tomaspalma force-pushed the refactor/classes-retrieval-speedup branch from cf2e0aa to 5c4cb8b Compare August 7, 2024 11:16
@tomaspalma tomaspalma changed the title refactor: use more django orm features to speed up classes retrieval Use more django orm features to speed up classes retrieval Aug 7, 2024
thePeras
thePeras previously approved these changes Aug 7, 2024
Copy link
Member

@thePeras thePeras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We like speed 🚗

@tomaspalma
Copy link
Member Author

😔 I removed the __init__.py from the controllers folder and your review was dismissed.... sorry, my mistake

@tomaspalma tomaspalma merged commit 178cb4e into develop Aug 7, 2024
@thePeras thePeras deleted the refactor/classes-retrieval-speedup branch August 7, 2024 22:53
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

Successfully merging this pull request may close these issues.

2 participants