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

Only make VACOLS request in eager_load_legacy_appeals_for_tasks if necessary #11719

Closed
1 task
lowellrex opened this issue Aug 9, 2019 · 1 comment · Fixed by #11893
Closed
1 task

Only make VACOLS request in eager_load_legacy_appeals_for_tasks if necessary #11719

lowellrex opened this issue Aug 9, 2019 · 1 comment · Fixed by #11893

Comments

@lowellrex
Copy link
Contributor

AppealRepository.eager_load_legacy_appeals_for_tasks loads information from VACOLS for all legacy appeals associated with a batch of tasks in a single request (really 4 requests, but it only executes that code path once for the entire batch instead of once for each legacy appeal). This dramatically reduces the load times of task queues because now we only make a single request to VACOLS instead of many. However, even if there are no LegacyAppeals associated with the set of tasks we pass to this function we still make a request to VACOLS. This PR exists to return early from the function in this case to save us even more time.

Acceptance criteria

  • Return early from AppealRepository.eager_load_legacy_appeals_for_tasks if there are no LegacyAppeals associated with the set of input tasks.
@lowellrex
Copy link
Contributor Author

What is this graph?

      1 | ||||||||||
      2 | ||
      3 | 
      5 | 
      8 | 

Estimating this at 1. Possible 2 because "programming is hard" (Moore, "Zero to Code" pp. 311).

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