Skip to content

Commit 3f1c916

Browse files
author
ykhadilkar
committed
Organization page performance fix - updating core to return only 20 rows
1 parent 416c548 commit 3f1c916

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

ckan/lib/dictization/model_dictize.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,13 @@ def group_dictize(group, context):
378378
if is_group_member:
379379
context['ignore_capacity_check'] = True
380380

381+
# Below code has been completely revamped in latest versions of CKAN.
382+
# Especially after this commit https://github.com/ckan/ckan/commit/cdfefcfa5d292fabc44c0a0b0c77682a85a17084
383+
# Processing 1000 datasets takes long time and defeats whole purpose of pagination.
384+
# Changing returned rows to 20.
381385
if include_datasets:
382-
q['rows'] = 1000 # Only the first 1000 datasets are returned
386+
q['rows'] = 20
387+
#q['rows'] = 1000 # Only the first 1000 datasets are returned
383388

384389
context_ = dict((k, v) for (k, v) in context.items() if k != 'schema')
385390
search_results = logic.get_action('package_search')(context_, q)

0 commit comments

Comments
 (0)