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

Restructure '_getMetadataTypes` in annotation-page.js #1917

Open
bctcvai opened this issue Dec 14, 2024 · 0 comments
Open

Restructure '_getMetadataTypes` in annotation-page.js #1917

bctcvai opened this issue Dec 14, 2024 · 0 comments

Comments

@bctcvai
Copy link
Member

bctcvai commented Dec 14, 2024

This function was originally written in an inline javascript style where embedded functions vs. member functions were favored for event handlers. Because the data structure of tator has increased, the function itself is quite complex containing a lot of nested logic.

In the case of multi videos, it is invoked multiple times often re-acquiring the same information for each video in a multi feed.

Suggestion is to make use of better coding practices, including:

  • Functional decomposition
  • Use of await syntax to avoid multiple nested promises.
  • Avoiding registration of application critical event handlers as anonymous lambda functions

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

No branches or pull requests

1 participant