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

Removing Geojson object while loading project page without toggling on "Show Map" feature. #6216

Closed
manjitapandey opened this issue Jan 23, 2024 · 3 comments
Assignees
Labels
scope: frontend type: enhancement Improving an existing functionality
Milestone

Comments

@manjitapandey
Copy link

Is your feature request related to a problem? Please describe.
For projects on explore projects page, the API being fetched is getting geojson object of all projects which is only used when show map is toogled on. Also on each page change on pagination the same geojson object is being fetched again and again. Loading geojson objects on initially and during pagination changes is causing project cards to load slower.

Describe the solution you'd like
We can fetch the projects API by omitting the geojson object i.e. "mapResults" by passing omitMapResults=true in query. By omitting the geojson object we save much time in API response and improve loading time. We can only call geojson object on show map toogle.

Additional context
Current api call: https://tasking-manager-tm4-production-api.hotosm.org/api/v2/projects/?action=any
modified api call: https://tasking-manager-tm4-production-api.hotosm.org/api/v2/projects/?action=any&omitMapResults=true

@ramyaragupathy ramyaragupathy added the type: enhancement Improving an existing functionality label Jan 23, 2024
@varun2948 varun2948 self-assigned this Feb 14, 2024
@varun2948
Copy link
Contributor

varun2948 commented Feb 14, 2024

I have implemented this on TM naxa server, it is now much faster with the map toggled off which is default toggled off. Now projects list will appear much faster. Should i do a PR for this fix on TM development ? @ramyaragupathy

@ramyaragupathy
Copy link
Member

@varun2948 - thanks for catching this, please go ahead with your proposal.

@ramyaragupathy ramyaragupathy added this to the v4.7.1 milestone Mar 21, 2024
@ramyaragupathy
Copy link
Member

Related to #6289 - fix tested and approved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: frontend type: enhancement Improving an existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants