#28518 closed Cleanup/optimization (fixed)
improve performance of loading geometries from DB
Reported by: | Sergey Fedoseev | Owned by: | Sergey Fedoseev |
---|---|---|---|
Component: | GIS | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
Change History (10)
comment:1 by , 7 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 7 years ago
comment:3 by , 7 years ago
Has patch: | set |
---|---|
Patch needs improvement: | set |
Triage Stage: | Unreviewed → Accepted |
comment:5 by , 7 years ago
Before:
In [3]: %timeit for x in City.objects.values_list('point')[:1000]: pass 49.5 ms ± 367 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
After:
In [4]: %timeit for x in City.objects.values_list('point')[:1000]: pass 32.1 ms ± 1.54 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)
comment:9 by , 7 years ago
Before:
In [2]: %timeit for x in City.objects.all()[:1000]: pass 106 ms ± 802 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
After:
In [2]: %timeit for x in City.objects.all()[:1000]: pass 81.8 ms ± 595 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
Note:
See TracTickets
for help on using tickets.
PR
Before:
After: