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

add endpoint for fetching task markers specifically #1130

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

CollinBeczak
Copy link
Contributor

@CollinBeczak CollinBeczak commented Jun 3, 2024

The PUT /tasks/box/:left/:bottom/:right/:top endpoint has some unneeded complexity when fetching for task markers. The reason why that endpoint was so complex is because it is also used to fetch task table data. This led to slower performance when fetching markers because paging, ordering, and sorting was applied.

Because that structure is needed for the tables but not for fetching tasks markers, I have created a new endpoint to reduce complexity: PUT /tasks/markers/:left/:bottom/:right/:top .

This new endpoint exports the same task data as the previous endpoint, but doesn't query for the total task count, and also doesn't do any ordering or paging.

21771 task in view with 1001 task limit:
Old endpoint (Time to complete: ~ 1.1s-1.9s ):
Screenshot 2024-07-19 at 4 36 15 PM

New endpoint (Time to complete: ~ 400ms-600ms):
Screenshot 2024-07-19 at 4 36 33 PM

977 task in view with 1001 task limit:
Old endpoint (Time to complete: ~ 450ms-700ms):
Screenshot 2024-07-19 at 4 37 34 PM

New endpoint (Time to complete: ~300ms-550ms):
Screenshot 2024-07-19 at 4 37 59 PM

Times were recorded on the same device at a similar time, and ran multiple times to get an average. There is a small performance increase with the new endpoint when the number of tasks in view is below the limit. A bigger performance increase is noticeable whenever there are significantly more than 1001 tasks(or the limit) as the endpoint no longer needs to query for all the tasks the meet the filter requirements to get the total tssk count.

Copy link

sonarcloud bot commented Jun 3, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
24.9% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@CollinBeczak
Copy link
Contributor Author

I'll get this rebased

@CollinBeczak CollinBeczak force-pushed the connect-to-new-endpoint-for-fetching-specifically-task-markers branch from 60fa2d2 to 5e23f89 Compare September 4, 2024 00:00
Copy link

sonarcloud bot commented Sep 4, 2024

@CollinBeczak CollinBeczak force-pushed the connect-to-new-endpoint-for-fetching-specifically-task-markers branch from 5e23f89 to a48ab8e Compare November 15, 2024 19:59
Copy link

sonarcloud bot commented Nov 15, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant