[Django] #12581: connection.queries should use a ring buffer to avoid large memory consumption under runserver

0 views
Skip to first unread message

Django

unread,
Jan 11, 2010, 12:36:15 PM1/11/10
to djang...@holovaty.com, django-...@googlegroups.com
#12581: connection.queries should use a ring buffer to avoid large memory
consumption under runserver
------------------------------------------+---------------------------------
Reporter: robhudson | Owner: nobody
Status: new | Milestone:
Component: Database layer (models, ORM) | Version: 1.1
Keywords: | Stage: Unreviewed
Has_patch: 0 |
------------------------------------------+---------------------------------
Currently, when running using runserver, each query is appended to a list.
For long running runserver processes, this list can grow quite large.

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

Django

unread,
Jan 11, 2010, 12:37:28 PM1/11/10
to djang...@holovaty.com, django-...@googlegroups.com
#12581: connection.queries should use a ring buffer to avoid large memory
consumption under runserver
---------------------------------------------------+------------------------
Reporter: robhudson | Owner: nobody
Status: new | Milestone:
Component: Database layer (models, ORM) | Version: 1.1
Resolution: | Keywords:
Stage: Unreviewed | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------------+------------------------
Changes (by robhudson):

* needs_better_patch: => 0
* has_patch: 0 => 1
* needs_tests: => 0
* needs_docs: => 0

--
Ticket URL: <http://code.djangoproject.com/ticket/12581#comment:1>

Django

unread,
Jan 12, 2010, 4:36:21 PM1/12/10
to djang...@holovaty.com, django-...@googlegroups.com
#12581: connection.queries should use a ring buffer to avoid large memory
consumption under runserver
---------------------------------------------------+------------------------
Reporter: robhudson | Owner: nobody
Status: new | Milestone:
Component: Database layer (models, ORM) | Version: 1.1
Resolution: | Keywords:
Stage: Unreviewed | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------------+------------------------
Comment (by robhudson):

FYI: Original patch by Alex Gaynor, tests and ticket added by Rob Hudson.

--
Ticket URL: <http://code.djangoproject.com/ticket/12581#comment:2>

Django

unread,
Feb 9, 2010, 9:09:31 AM2/9/10
to djang...@holovaty.com, django-...@googlegroups.com
#12581: connection.queries should use a ring buffer to avoid large memory
consumption under runserver
---------------------------------------------------+------------------------
Reporter: robhudson | Owner: nobody
Status: new | Milestone: 1.2
Component: Database layer (models, ORM) | Version:
Resolution: | Keywords:
Stage: Accepted | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------------+------------------------
Changes (by russellm):

* stage: Unreviewed => Accepted
* version: 1.1 =>
* milestone: => 1.2

--
Ticket URL: <http://code.djangoproject.com/ticket/12581#comment:3>

Django

unread,
Feb 23, 2010, 7:35:09 PM2/23/10
to djang...@holovaty.com, django-...@googlegroups.com
#12581: connection.queries should use a ring buffer to avoid large memory
consumption under runserver
---------------------------------------------------+------------------------
Reporter: robhudson | Owner: nobody
Status: new | Milestone:
Component: Database layer (models, ORM) | Version:
Resolution: | Keywords:
Stage: Accepted | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------------+------------------------
Changes (by ubernostrum):

* milestone: 1.2 =>

Comment:

1.2 is feature-frozen, moving this feature request off the milestone.

--
Ticket URL: <http://code.djangoproject.com/ticket/12581#comment:4>

Django

unread,
Mar 29, 2010, 11:57:24 AM3/29/10
to djang...@holovaty.com, django-...@googlegroups.com
#12581: connection.queries should use a ring buffer to avoid large memory
consumption under runserver
---------------------------------------------------+------------------------
Reporter: robhudson | Owner: nobody
Status: new | Milestone:
Component: Database layer (models, ORM) | Version:
Resolution: | Keywords:
Stage: Accepted | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------------+------------------------
Comment (by adurdin):

Note that the django debug toolbar’s sql panel does not work with this
patch.

--
Ticket URL: <http://code.djangoproject.com/ticket/12581#comment:5>

Django

unread,
Mar 28, 2011, 10:43:43 AM3/28/11
to djang...@holovaty.com, django-...@googlegroups.com
#12581: connection.queries should use a ring buffer to avoid large memory
consumption under runserver
-------------------------------------+-------------------------------------
Reporter: robhudson | Owner: nobody
Status: new | Milestone:
Component: Database | Version:
layer (models, ORM) | Keywords:
Resolution: | Has patch: 1
Triage Stage: Accepted | Needs tests: 0
Needs documentation: 0 |
Patch needs improvement: 0 |
-------------------------------------+-------------------------------------

Comment (by aaugustin):

This is a duplicate of #3711 (closed as wontfix) and #6734 (closed as
duplicate).

Since the ticket was accepted by a core dev, I won't close it, though.

--
Ticket URL: <http://code.djangoproject.com/ticket/12581#comment:6>

Django

unread,
Apr 2, 2011, 1:31:36 AM4/2/11
to djang...@holovaty.com, django-...@googlegroups.com
#12581: connection.queries should use a ring buffer to avoid large memory
consumption under runserver
-------------------------------------+-------------------------------------
Reporter: robhudson | Owner: nobody
Type: New | Status: new
feature | Component: Database layer
Milestone: | (models, ORM)
Version: | Severity: Normal
Resolution: | Keywords:
Triage Stage: Accepted | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 |
-------------------------------------+-------------------------------------
Changes (by mattmcc):

* type: => New feature
* severity: => Normal


--
Ticket URL: <http://code.djangoproject.com/ticket/12581#comment:7>

Django

unread,
Apr 16, 2011, 2:07:36 AM4/16/11
to django-...@googlegroups.com
#12581: connection.queries should use a ring buffer to avoid large memory
consumption under runserver
-------------------------------------+-------------------------------------
Reporter: robhudson | Owner: nobody
Type: | Status: new
Cleanup/optimization | Component: Database layer
Milestone: | (models, ORM)
Version: | Severity: Normal
Resolution: | Keywords:
Triage Stage: Accepted | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 1 |
-------------------------------------+-------------------------------------
Changes (by julien):

* needs_better_patch: 0 => 1
* type: New feature => Cleanup/optimization


Comment:

The tests would need to be rewritten using unittests since this is now
Django's preferred way. Also, the datastructures tests seem to have been
moved to source:django/trunk/tests/regressiontests/utils/datastructures.py

--
Ticket URL: <http://code.djangoproject.com/ticket/12581#comment:8>

Reply all
Reply to author
Forward
0 new messages