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

Remove duplicate DLP API calls #1166

Closed
jjnesbitt opened this issue Jul 6, 2022 · 3 comments · Fixed by #1208
Closed

Remove duplicate DLP API calls #1166

jjnesbitt opened this issue Jul 6, 2022 · 3 comments · Fixed by #1208
Assignees
Labels
bug Something isn't working client Pertains to the web client performance Improve performance of an existing feature released This issue/pull request has been released.

Comments

@jjnesbitt
Copy link
Member

Here's a screen grab of the network panel when loading the Dandiset Landing Page. Notice all of the duplicate calls

image

These should be investigated and removed.

@jjnesbitt jjnesbitt added client Pertains to the web client bug Something isn't working labels Jul 6, 2022
@waxlamp waxlamp added the performance Improve performance of an existing feature label Jul 6, 2022
@waxlamp
Copy link
Member

waxlamp commented Jul 6, 2022

@DeepikaGhodki, I think you should work on this to get some familiarity with the DLP (dandiset landing page) code; @mvandenburgh, if you could pair with Deepika to provide a quick tour and any necessary mentorship, that would be great.

@DeepikaGhodki
Copy link
Contributor

I was going through the DLP code, documenting my initial findings here:

3 calls to /versions on page load

  • watchEffect (watching on all states) (fetchDandiset that calls the above API)
    One obvious fix would be to remove watchEffect and watch on a specific state. (This change was made in Navigation buttons on landing page #1172)

  • watch on props.identifer results in remaining 2 (initializeDandiset)
    This remaining extra call is attributed to getting the data corresponding to latest version. It is a two step process, where first we get the count of versions and then fetch the last one. We can either get the latest version directly from the server or access the versions[] state from the store.

Would like to dig deeper into the logic for initialising dandiset with most recent version, but would love to hear your comments or any historical reasons for multiple calls during initialization.

TBD: /info

@dandibot
Copy link
Member

🚀 Issue was released in v0.2.43 🚀

@dandibot dandibot added the released This issue/pull request has been released. label Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working client Pertains to the web client performance Improve performance of an existing feature released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants