treetracker-web-map-client
treetracker-web-map-client copied to clipboard
The initial view API is too slow
Description
And it is inaccurate, there are some issues are about this problem.
To reproduce
- visit: https://prod-k8s.treetracker.org/webmap/trees?clusterRadius=0.05&zoom_level=10&map_name=echo
Some hints:
- Please read our readme for more information/guide/tutorial.
- For design guidelines checkout our Figma design.
- Here is an engineering book in Greenstand.
- To know more about our organization, visit our website.
- If you want to join the slack community (some resources need the community member's permission), please leave your email address.
- More issues in this project: https://github.com/orgs/Greenstand/projects/26
@dadiorchen. I checked the link you provided. The API request occurred within 300ms with a status code of 304. It means that it is cached which is the best performance boost you can ask for with an API. I am saying this because that would imply that the problem here may be due to performance issues with other network requests on the same view. Is this issue only affecting production env?
I am interested in assisting with this ticket. I don't know how to improve the accuracy of the API call but I would like to attempt the performance issues on the initial page load. 😀
@keyy123 thanks having you on this, please let me know if you need any resource.
The difficulty on thinks like this:
- Just prod can reproduce things because of the magnitude of the data.
- Sometimes you can reproduce it because of cache factor.
- Sometimes the bug is related to global Database cluster load/pressure
@dadiorchen may you place the current prod link here when you have the time? The link above links to only a JSON response of 1 specific endpoint w/o the frontend present.
The solution to solve this is to build a new API on query API to get the initial view in a better way, the ticket is here: https://github.com/Greenstand/treetracker-query-api/issues/308
So when we finish this API, we can change the web map core to use it.