Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue1230 #1342

Closed
wants to merge 9 commits into from
Closed

Issue1230 #1342

wants to merge 9 commits into from

Conversation

rrhg
Copy link

@rrhg rrhg commented Jul 14, 2020

Replace chunk_queryset() util with server-side cursor #1230
Motivation

Currently Misago uses chunk_queryset utility that iterates on queryset in chunks of specified length, but this task can be easily replaced with queryset.iterator() which on PostgreSQL should use chunking in database.

Solution

Change function util chunk_queryset to iterator() method.

rinter17 added 9 commits July 14, 2020 09:30
…ly(for now) in misago/core/tests/test_chunk_queryset.py
…ly(for now) in file : misago/faker/management/commands/createfakehistory.py

Currently Misago uses chunk_queryset utility that iterates on queryset in chunks of specified length, but this task can be easily replaced with queryset.iterator() which on PostgreSQL should use chunking in database.
…ly(for now) in file : misago/faker/management/commands/createfakeposts.py

Currently Misago uses chunk_queryset utility that iterates on queryset in chunks of specified length, but this task can be easily replaced with queryset.iterator() which on PostgreSQL should use chunking in database.
…ly(for now) in file :

Currently Misago uses chunk_queryset utility that iterates on queryset in chunks of specified length, but this task can be easily replaced with queryset.iterator() which on PostgreSQL should use chunking in database.
…ly(for now) in file : misago/threads/management/commands/rebuildpostssearch.py

Currently Misago uses chunk_queryset utility that iterates on queryset in chunks of specified length, but this task can be easily replaced with queryset.iterator() which on PostgreSQL should use chunking in database.
Currently Misago uses chunk_queryset utility that iterates on queryset in chunks of specified length, but this task can be easily replaced with queryset.iterator() which on PostgreSQL should use chunking in database.
Currently Misago uses chunk_queryset utility that iterates on queryset in chunks of specified length, but this task can be easily replaced with queryset.iterator() which on PostgreSQL should use chunking in database.
Currently Misago uses chunk_queryset utility that iterates on queryset in chunks of specified length, but this task can be easily replaced with queryset.iterator() which on PostgreSQL should use chunking in database.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 97.572% when pulling c9254c5 on rrhg:issue1230 into da14e8e on rafalp:master.

@rafalp rafalp added this to the Misago 0.28 milestone Sep 29, 2020
@rafalp rafalp closed this Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants