#28020: make GEOSGeometry.json use OGRGeometry.json again (for performance
reasons)
-------------------------------------+-------------------------------------
Reporter: Sergey Fedoseev | Owner: Sergey
Type: | Fedoseev
Cleanup/optimization | Status: assigned
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by Sergey Fedoseev:
Old description:
> `GEOSGeometry.json` was using `OGRGeometry.json` prior to 1.9. That was
> changed in #25141. Now GDAL is required (#26753) and I believe we should
> restore previous `GEOSGeometry.json` implementation for performance
> reasons:
>
> {{{
> In [67]: ls = LineString([(x, x) for x in range(1000)])
>
> In [68]: %timeit a = ls.json
> 10 loops, best of 3: 42.6 ms per loop
>
> In [69]: %timeit a = ls.ogr.json
> 100 loops, best of 3: 3.75 ms per loop
> }}}
New description:
`GEOSGeometry.json` was using `OGRGeometry.json` prior to 1.9. That was
changed in #25141. Now GDAL is required (#26753) and I believe we should
restore previous `GEOSGeometry.json` implementation for performance
reasons:
{{{
In [67]: ls = LineString([(x, x) for x in range(1000)])
In [68]: %timeit ls.json
10 loops, best of 3: 42.6 ms per loop
In [69]: %timeit ls.ogr.json
100 loops, best of 3: 3.75 ms per loop
}}}
--
--
Ticket URL: <https://code.djangoproject.com/ticket/28020#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/068.9ad87341de406f2243c2786587ad7c41%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.