Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

PERFORMANCE: Replace prefetching and ModelSerializers with .values() and manual stitching #47

Open
pmg103 opened this issue Feb 3, 2020 · 1 comment

Comments

@pmg103
Copy link
Contributor

pmg103 commented Feb 3, 2020

Some initial investigation seems to suggest that a speedup could be gained by ditching prefetch_related and select_related and ModelSerializer and building the response using .values_list() and .values() and manual stitching together the values.

Is this good enough that it would warrant losing the ability to call Model methods/properties?

Would also mean a complete rewrite of the implementation of course :D -- but probably also a simplification.

@RealOrangeOne
Copy link
Contributor

RealOrangeOne commented Feb 3, 2020

10x speedup

😱

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

No branches or pull requests

2 participants