consumerfinance.gov icon indicating copy to clipboard operation
consumerfinance.gov copied to clipboard

Speed up initial render and hydration of pfc grad path

Open wpears opened this issue 11 months ago • 0 comments

Closes https://github.com/cfpb/consumerfinance.gov/issues/8219

This PR does two things:

  • Adds and utilizes some bulk updating methods to prevent unnecessary recalculations (primarily in the financial model). Recalculations in the models only happen after all the data has been seeded from the params.
  • Checks the radio buttons on the landing page directly instead of emitting clicks (which then trigger a bunch of unneeded/unnecessary events and processing logic)/

Testing

  • Visit prod in one window. It will be very slow to both initially load and then to populate the radio buttons (5-15s for each)
  • Pull, build, fire up localhost and visit localhost:8000. Loading should be much faster, as should populating the radio buttons. (1-2s)

wpears avatar Mar 14 '24 17:03 wpears