Skip to content

9745 - Large Case Support (amgen 5,000 exhibits)#9765

Open
codyseibert wants to merge 33 commits intostagingfrom
9745-amgen-large-case-support
Open

9745 - Large Case Support (amgen 5,000 exhibits)#9765
codyseibert wants to merge 33 commits intostagingfrom
9745-amgen-large-case-support

Conversation

@codyseibert
Copy link
Contributor

@codyseibert codyseibert commented Feb 23, 2026

This PR introduces change that reduce the amount of information returned from these interactors due to the 6mb limit. For the Amgen case, they plan to have 5,000+ exhibits which means all of our backend endpoints which used to return the fully updated case (including all docket entries), would return a ton of data which would cause it to hit limits. In order to get this case working in our system, it required some of the following optimizations:

Fetch Docket Entries Separate

We added a new endpoint which allows the UI to fetch all the docket entries, 1,000 at a time, from the backend. This means that in our UI, whenever we need to fetch the full case, we first fetch the case metadata using the ?excludeDocketEntries=true query string, then we fetch the docket entries as separate paginated rest requests. The getCaseInteractor proxy will then re-construct the full case on the UI meaning the UI requires minimal changes

Updating Cases

All throughout our code base when we want to update a something simple on a case, we invoke updateCaseAndAssociations which will fetch the entire case and all the docket entries once more. Often these interactors already fetch the full case up front and then modify it, then it'll call updateCaseAndAssociations which will fetch the full case again and do a diff. The optimization in this pull request allows passing an oldCase to updateCaseAndAssocations which causes that helper function to not need to re-fetch the full case. This removes double fetching of the full case which for amgen is a huge savings. The cavet is you much remember to do a structuredClone to create this oldCase object so that you do not pass it around and update it by reference somewhere in the code.

Return Docket Number

In a lot of these endpoints, after we modify a case, we return the full case and all the docket entires associated with it back in the API request payload. This again causes the app to crash as the data for amgen is too large. Often we never need to send back the full case. Instead, we can just send back a simple payload and the UI can refetch the full case if it needs to. This required changing a lot of code but will cause a lot less data to need to be serialized and send back in the response bodys when doing POST or PUT or PATCH calls. Eventually I'd like to have all these endpoints just return a 204 no content, but for now we just return the bare minimum when possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants