Page MenuHomeElementl

prevent slow assets from slowing down page loads

Authored by prha on May 3 2021, 11:31 PM.



We're loading the full set of assets on every page, because we're loading all assets to
include them on every page. This diff changes the secondary asset query lazy, so that
only opening global search should incur that query cost.

We should also be rewriting the graphql server so that a single slow request
doesn't block all other requests

Test Plan

Added a sleep call to the graphql asset query, saw everything slow down

Diff Detail

R1 dagster
Lint Not Applicable
Tests Not Applicable

Event Timeline

prha requested review of this revision.May 3 2021, 11:50 PM

Oh huh, I thought I had made the secondary query lazy. We can also do that, so that it won't perform the query until the user actually focuses the search input.

get rid of feature flag, use lazy query instead

  • State setters shouldn't need to be provided in deps arrays.
  • I don't think you need to track state for the secondary query -- there should be a called value on the query result that I believe should represent the value you want.

update, get rid of state

This revision is now accepted and ready to land.May 5 2021, 3:57 PM