FCSCOpendata / ckanext-hierarchy

Organization hierarchy - CKAN extension
GNU Affero General Public License v3.0
0 stars 0 forks source link

Organization and Theme pages are loading a bit slower #3

Open MuhammadIsmailShahzad opened 2 years ago

MuhammadIsmailShahzad commented 2 years ago

When we navigate to organization or group pages due to our custom hierarchy implementation of the trees, the pages are loading a bit slower than usual.

According to https://github.com/FCSCOpendata/ckanext-hierarchy/blob/master/ckanext/hierarchy/templates/organization/snippets/organization_tree.html#L2-L7 following helpers are available in order to speed up the process https://github.com/datagovuk/ckanext-dgu/blob/5fb78b354517c2198245bdc9c98fb5d6c82c6bcc/ckanext/dgu/lib/helpers.py#L140-L168

Acceptance

Task

Analysis

I tried adding the helpers mentioned above in our code and refactor the organization_list.html template with the following code

{#
Display a hierarchical tree of organizations

Example:

{% snippet "organization/snippets/organization_list.html" %}

#}

{% if q is not defined %}{% set q = c.q %}{% endif %}

<div id="publisher-tree">
     {{ h.render_tree() }} | safe
</div>

It was much faster but our custom work didn't show up. The tree relationships weren't being displayed and all the page navigation in the bottom of the page was loading same list of names. Even if I clicked on page 3, etc.

Also Themes and Organization both pages were showing same content so I think a bit of a refactor according to our current custom development would be required.

osahon-okungbowa commented 2 years ago

We need this speed improvement implemented for FCSC Organizations and Themes page