Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#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 Sergey Fedoseev, 7 years ago

Owner: changed from nobody to Sergey Fedoseev
Status: newassigned

comment:2 by Sergey Fedoseev, 7 years ago

PR

Before:

In [2]: %timeit for x in City.objects.values_list('point')[:1000]: pass
64.4 ms ± 644 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)

After:

In [3]: %timeit for x in City.objects.values_list('point')[:1000]: pass
49.8 ms ± 957 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)

comment:3 by Tim Graham, 7 years ago

Has patch: set
Patch needs improvement: set
Triage Stage: UnreviewedAccepted

comment:4 by Tim Graham <timograham@…>, 7 years ago

Resolution: fixed
Status: assignedclosed

In 1a85b07:

Fixed #28518 -- Improved performance of loading geometries from DB.

comment:5 by Sergey Fedoseev, 7 years ago

another PR

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:6 by Tim Graham <timograham@…>, 7 years ago

In 2ef4b479:

Refs #28518 -- Improved performance of loading geometries from DB.

comment:7 by Tim Graham <timograham@…>, 6 years ago

In 8869142a:

Fixed #28632 -- Updated docs about using raw SQL with GIS and doc'd changes from refs #28518 in release notes.

comment:8 by Tim Graham <timograham@…>, 6 years ago

In a44fb4aa:

[2.0.x] Fixed #28632 -- Updated docs about using raw SQL with GIS and doc'd changes from refs #28518 in release notes.

Backport of 8869142a4d5b069c61781c0e4c5fdc971b017949 from master

comment:9 by Sergey Fedoseev, 6 years ago

PR

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)

comment:10 by Tim Graham <timograham@…>, 6 years ago

In a4f9ef4:

Refs #28518 -- Improved performance of assigning values to GeometryFields.

Note: See TracTickets for help on using tickets.
Back to Top