[Django] #28020: make GEOSGeometry.json use OGRGeometry.json again (for performance reasons)

2 views
Skip to first unread message

Django

unread,
Apr 5, 2017, 2:56:15 AM4/5/17
to django-...@googlegroups.com
#28020: make GEOSGeometry.json use OGRGeometry.json again (for performance reasons)
------------------------------------------------+------------------------
Reporter: Sergey Fedoseev | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: GIS | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
`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
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28020>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 5, 2017, 2:56:21 AM4/5/17
to django-...@googlegroups.com
#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
-------------------------------------+-------------------------------------
Changes (by Sergey Fedoseev):

* status: new => assigned
* owner: nobody => Sergey Fedoseev


--
Ticket URL: <https://code.djangoproject.com/ticket/28020#comment:1>

Django

unread,
Apr 5, 2017, 3:01:56 AM4/5/17
to django-...@googlegroups.com
#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

unread,
Apr 5, 2017, 3:39:32 AM4/5/17
to django-...@googlegroups.com
#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: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Claude Paroz):

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/28020#comment:3>

Django

unread,
Apr 5, 2017, 4:37:41 AM4/5/17
to django-...@googlegroups.com
#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: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sergey Fedoseev):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/8297 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/28020#comment:4>

Django

unread,
Apr 5, 2017, 8:00:48 AM4/5/17
to django-...@googlegroups.com
#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: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Claude Paroz):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/28020#comment:5>

Django

unread,
Apr 5, 2017, 9:03:33 AM4/5/17
to django-...@googlegroups.com
#28020: make GEOSGeometry.json use OGRGeometry.json again (for performance reasons)
-------------------------------------+-------------------------------------
Reporter: Sergey Fedoseev | Owner: Sergey
Type: | Fedoseev
Cleanup/optimization | Status: closed
Component: GIS | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* 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>

Django

unread,
Jul 12, 2017, 3:11:31 PM7/12/17
to django-...@googlegroups.com
#28020: make GEOSGeometry.json use OGRGeometry.json again (for performance reasons)
-------------------------------------+-------------------------------------
Reporter: Sergey Fedoseev | Owner: Sergey
Type: | Fedoseev
Cleanup/optimization | Status: closed
Component: GIS | Version: master

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

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>

Reply all
Reply to author
Forward
0 new messages