Skip to content

Conversation

@labkey-nicka
Copy link
Contributor

@labkey-nicka labkey-nicka commented Nov 15, 2024

Rationale

The withAssayModels component wrapper accepts an assayName prop with which it optionally loads an assay protocol. Each time, however, it loads all of the assay definitions in the requested container which can be overly burdensome, especially, in containers with a large number of assays defined.

This change is an optimization which changes the wrapper to only request the assay definition associated with the provided assayName if/when it is furnished. This can have a significant impact on initial page load times for our /assay routes since they only need the assay definition of the protocol being requested.

For example, locally I have a container with 127 assay definitions which is taking ~8 seconds to fulfill the assay-assayList.api request for an assay page. With this change, the time is down to sub 200ms.

That said, there are other usages of withAssayModels that do not specify an assayName prop which will continue to request all of the definitions in the container. This PR doesn't attempt to optimize those and we'll seek to address them at later date.

Related Pull Requests

Changes

  • When an assayName prop is specified on withAssayModels, then only load the associated assay definition rather than all definitions in the container.

@labkey-nicka labkey-nicka merged commit f63a432 into develop Nov 15, 2024
@labkey-nicka labkey-nicka deleted the fb_faster_assay branch November 15, 2024 23:38
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.

3 participants