{{{
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
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28020>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => assigned
* owner: nobody => Sergey Fedoseev
--
Ticket URL: <https://code.djangoproject.com/ticket/28020#comment:1>
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>
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/28020#comment:3>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/8297 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/28020#comment:4>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/28020#comment:5>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"12d0567aa5e82322543f0c0c126ba18c91a1e439" 12d0567a]:
{{{
#!CommitTicketReference repository=""
revision="12d0567aa5e82322543f0c0c126ba18c91a1e439"
Fixed #28020 -- Made GEOSGeometry.json use OGRGeometry.json for better
performance.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28020#comment:6>
Comment (by Tim Graham <timograham@โฆ>):
In [changeset:"815a0bb80de7bdbabe0d865e8f37fa7e9b64c095" 815a0bb8]:
{{{
#!CommitTicketReference repository=""
revision="815a0bb80de7bdbabe0d865e8f37fa7e9b64c095"
Refs #28020 -- Removed obsolete GeometryCollection.json.
Unused since 12d0567aa5e82322543f0c0c126ba18c91a1e439.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28020#comment:7>