-
Notifications
You must be signed in to change notification settings - Fork 24
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
Speed up annotation list #7410
Speed up annotation list #7410
Conversation
@frcroth In the front-end, we already distinguished between the types How is this distinguished/named in the back-end? Should I handle it like this in the front-end?
Or am I getting this wrong? |
Yes, it seems there are now 3 degrees of compactness, full, somewhat compact from list and compact from list query with compact query set.
This seems sensible to me. |
@frcroth I noticed that the owner and team properties are flattened into the new compact type like this:
Could you nest them like this so that it matches the format of the existing
Also I'm wondering why the team property is not an array (and then |
Also I noticed that the route |
Also, |
And I'm afraid, we need the |
Sorry for the peu á peu messaging. Also, when downloading an annotation, we currently check whether the annotation has a volume layer. This information could be found out via an additional request, though. So, no need to change anything for now. |
@philippotto I renamed stats and added state, tags and the correct teams. Is the non-compact list still useful? otherwise I could also remove that code path. |
…nds/webknossos into compact-annotation-list-query
…n publicWrites; use new compact annotation info properly
Great 👍 I integrated it and the dashboard works now.
Yes, it can be removed and I think we should do this to reduce complexity. These routes should then return the compact annotation version, too:
After removal, the compact GET parameter shouldn't exist, anymore. |
We need to check compatibility with wklibs, too. @fm3 can give insights probably, since he just reworked the client in wklibs. |
Good point! That’s true, this would be a breaking change for the libs. scalableminds/webknossos-libs#948 makes the libs use versioned api routes. This means that we can support the old case by supplying the older version in the LegacyApiController. However, many users might not yet have adopted to that new libs version. Let’s wait some time before introducing this kind of breaking change. I’d say in this PR it would be best to have this be opt-in only. |
I think it wouldn't be difficult to adapt this so that everything that was returned in the previous non-compact way is now also part of the compact path (and still use only one query). In that case, the old way could be removed, couldn't it? |
sounds fair, yes |
…nds/webknossos into compact-annotation-list-query
Ok, great 👍 Then, let's keep it simple and just go with one type. I cleaned up the front-end and undid the unnecessary changes. I took the opportunity and renamed the APIAnnotationCompact type to APIAnnotationInfo to match the back-end's nomenclature better. Let me know in case you need something else from the front-end. |
Nice! I think you could assign someone for frontend review then if you believe the changes are non-trivial. |
…nds/webknossos into compact-annotation-list-query
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.
Nice 😎 Please see my small comments
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.
Frontend LGTM and I did not find any bugs during testing with the dev instance.
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.
Looks like the formattedHash field is missing, which is why the snapshot tests fail. Is this field used somewhere? Should we just refresh the snapshots? The libs client does not use it
@MichaelBuessemeyer Note that since the CI wasn’t green recently, maybe the dev instance you tested on was outdated |
Yes it seems like it is not needed anymore: #7410 (comment)
Oh, thanks for the notice. I should do a quick retest once the CI is green again 👍 |
@MichaelBuessemeyer I just installed the new version as a dev instance :) |
Thanks 🙏. |
URL of deployed dev instance (used for testing):
Steps to test:
TODOs:
Issues:
(Please delete unneeded items, merge only when none are left open)