-
Notifications
You must be signed in to change notification settings - Fork 38
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
add endpoint for fetching task markers specifically #1130
Conversation
|
I'll get this rebased |
60fa2d2
to
5e23f89
Compare
|
5e23f89
to
a48ab8e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM other than the noted docs typos, but I think you should wait for @ljdelight's signoff too before merging as he's more familiar with the backend code than I am.
|
(Approved in direct conversation) |
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 ):
New endpoint (Time to complete: ~ 400ms-600ms):

977 task in view with 1001 task limit:

Old endpoint (Time to complete: ~ 450ms-700ms):
New endpoint (Time to complete: ~300ms-550ms):

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.