Skip to content

DIS-2809: Reduce unnecessary API calls - #3

Open
catsoup11789 wants to merge 10 commits into
GroveForLibraries:26.10.00from
catsoup11789:26.10.00-2809
Open

DIS-2809: Reduce unnecessary API calls#3
catsoup11789 wants to merge 10 commits into
GroveForLibraries:26.10.00from
catsoup11789:26.10.00-2809

Conversation

@catsoup11789

@catsoup11789 catsoup11789 commented Sep 5, 2026

Copy link
Copy Markdown

Many of these will be hard to test the benefit of, but if you're tracking API requests in Aspen Discovery or have a console log, you should see significantly less repetitive entries. Just noting the individual changes here to update test notes later and whether or not we need to update any documentation....

  • GroupedWork: Only prefetch data for first format. Switching to another format should trigger a new set of API calls and there will be no missing data or unexpected results.
  • MyHolds & MyCheckouts: Removed background fetch on Drawer which was pointless when we force refetch whenever loading the Holds/Checkouts screen. Side effect of this unnecessary background fetch was it also updated when Language was updated, when we still only need it when going to that screen.
  • MyHolds: It previously polled validPickupLocations for every hold on screen load, now it will only do so if the user goes to change pickup location for a hold (and only for that hold)
  • MyList: We were previously fetching list details twice when opening a list; make sure list data still loads in as expected
  • MyLibraryCard: We were making unnecessary (3+) calls to updateScreenBrightnessStatus when leaving the screen; this is related to storing on the user table if we should ask them for permission...
  • Home: We called getDefaultFacets, getSearchIndexes, and getSearchSources every time this screen was loaded, when it's very doubtful any of these values would change in the same session -- setup for the Search Results facets
  • MySavedSearches - We were fetching getSavedSearches twice when loading the screen every time; make sure list of saved searches populates as expected

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

Successfully merging this pull request may close these issues.

2 participants