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

Repeat or unnecessary requests for related artists from artist pages` #1728

Open
joeyAghion opened this issue Aug 16, 2017 · 2 comments
Open

Comments

@joeyAghion
Copy link
Contributor

Loading a single artist page (like /artist/lynn-chadwick) triggers 5 separate API requests for related artists. E.g.:

/api/v1/related/layer/main/artists?artist%5B%5D=lynn-chadwick&exclude_artists_without_artworks=true&size=0&total_count=1
/api/v1/related/layer/contemporary/artists?artist%5B%5D=lynn-chadwick&exclude_artists_without_artworks=true&size=0&total_count=1
/api/v1/related/layer/main/artists?artist=lynn-chadwick&size=0&total_count=1
/api/v1/related/layer/main/artists?artist%5B%5D=lynn-chadwick&exclude_artists_without_artworks=true&size=1
/api/v1/related/layer/main/artists?artist%5B%5D=lynn-chadwick&exclude_artists_without_artworks=true&size=15

Some of these are slightly different, but 3 (#1, 4, and 5) are identical except for size and total_count parameters, so could presumably be satisfied by a single request.

I'm not sure where these originate but the repetition causes significant API load and seems unnecessary.

@joeyAghion
Copy link
Contributor Author

Looking at the page again, there doesn't seem to be any related artists data actually presented. Maybe these could all just go away?

@sweir27
Copy link
Contributor

sweir27 commented Mar 12, 2018

I was able to identify consistently three places where these requests are happening on the overview page:

  • To generate a list of artist statuses to determine which tabs to show on the artist page
  • To pull a similar artist to use in the CTA that asks you to create an account
  • To determine whether or not to populate (and how to style) a rail of related artists that appears at the bottom of the page (once you scroll through all of the artworks)
    • We actually do need the count here. Currently, the count of related artists comes through metaphysics so there's not an easy way to just swap in the x-total-count header here, so I'm not sure if it's worth digging in further.

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

2 participants