Skip to content

Commit

Permalink
feat(discoveryLoadTimeSpike): added explanatory comments, cleaned up …
Browse files Browse the repository at this point in the history
…code
  • Loading branch information
jarvisraymond-uchicago committed Aug 23, 2024
1 parent 799e9c2 commit 905b7e1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/Discovery/Discovery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,6 @@ const highlightSearchTerm = (value: string, searchTerm: string, highlighClassNam
};
};



export interface FilterState {
[key: string]: { [value: string]: boolean }
}
Expand Down
7 changes: 4 additions & 3 deletions src/Discovery/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,7 @@ const DiscoveryWithMDSBackend: React.FC<{
// Then a batch with all the studies
const [studiesBatchCount, setStudiesBatchCount] = useState(0);
const expectedNumberOfTotalBatches = 2;
const numberOfStudiesForSmallerBatch = isEnabled('discoveryUseAggMDS')
? 5
: 10;
const numberOfStudiesForSmallerBatch = 5;
const numberOfStudiesForAllStudiesBatch = 2000;
const isBatchLoadingEnabled = isEnabled('discoveryUseAggMDS') && isEnabled('studyRegistration');

Expand Down Expand Up @@ -217,6 +215,9 @@ const DiscoveryWithMDSBackend: React.FC<{

const batchLoadingInfo = {
isBatchLoadingEnabled,
// All batches all loaded if the studies are not null and
// their length is great than the studies for the smaller batches
// from loadStudiesFromAggMDS and getSomeStudiesFromMDS
allBatchesAreLoaded: studies === null
? false
: studies?.length > numberOfStudiesForSmallerBatch * 2,
Expand Down
2 changes: 1 addition & 1 deletion src/components/layout/ExternalFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const ExternalFooter: React.FC<ExternalFooterProps> = (props: ExternalFooterProp
style={{ display: 'block', width: '100%', height: elementHeight }}
onLoad={
() => setElementHeight(
`${document.getElementById('externalFooter').contentWindow.document.body.scrollHeight}px`,
//`${document.getElementById('externalFooter').contentWindow.document.body.scrollHeight}px`,
)
}
/>
Expand Down

0 comments on commit 905b7e1

Please sign in to comment.