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

Slow response with API endpoint "/projects/{id}.json" #70

Open
sanak opened this issue Apr 19, 2021 · 3 comments
Open

Slow response with API endpoint "/projects/{id}.json" #70

sanak opened this issue Apr 19, 2021 · 3 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@sanak
Copy link
Member

sanak commented Apr 19, 2021

Problem
There is already /projects.json include=geometry filter, but similar filter is preferable also for /projects/{id}.json, because of slow response.

To Reproduce
Specify big size polygon as project's geometry, then access to /projects/{id}.json.

Expectation
Currently, the request takes around 1 ~ 2 sec,
but if possible, default = none geometry seems to be good.

@sanak sanak added the enhancement New feature or request label Apr 19, 2021
@sanak sanak self-assigned this Apr 19, 2021
@dkastl
Copy link
Member

dkastl commented Apr 20, 2021

Why is the response slow?
Because of the size of the response due to large GeoJSON content?

Maybe we should think about users uploading too detailed polygons, which are often too big and can be simplified. Eventually we could simplify geometries and make it optional to include the original one.

@sanak
Copy link
Member Author

sanak commented Apr 22, 2021

@dkastl

Why is the response slow?
Because of the size of the response due to large GeoJSON content?

Yes.

Maybe we should think about users uploading too detailed polygons, which are often too big and can be simplified. Eventually we could simplify geometries and make it optional to include the original one.

Okay, but I will try to check why detailed polygon is so slow, at first.

@dkastl dkastl modified the milestone: v3.0.0 Apr 15, 2023
@dkastl
Copy link
Member

dkastl commented May 16, 2023

For projects list there is already include=geometry as request parameter available, but for individual projects the geometry must be really huge to produce a slow response. And this response will not only be slow via API but also on the application side.

So I think it would be best to:

  • lower the accuracy of geometries as in Shorten WKT coordinates (limit decimals) #7
  • see how we can prevent users to upload huge polygons ... maybe a warning before uploading a very large polygon would be enough? But what is "very large". We could also just mention it in the documentation.

@dkastl dkastl modified the milestones: v5.0.0, v5.1.0 Jun 20, 2023
@dkastl dkastl modified the milestones: v5.1.0, v5.2.0 May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants