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

Improves run rendering latency #1098

Merged
merged 1 commit into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions ui/frontend/src/components/dashboard/Runs/RunSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -662,8 +662,7 @@ export const RunSummary = (props: {
: null;

// Quick buffer to ensure no runs are missed
console.log("minDate", minDate);
console.log("maxDate", maxDate);

if (minDate !== null) {
minDate.setDate(minDate.getDate() - 1);
}
Expand Down
2 changes: 1 addition & 1 deletion ui/frontend/src/components/dashboard/Runs/Runs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Loading } from "../../common/Loading";
import { RunSummary } from "./RunSummary";
import { skipToken } from "@reduxjs/toolkit/dist/query";

export const MAX_RUNS_QUERIED = 1000;
export const MAX_RUNS_QUERIED = 100;

const Runs: React.FC<{ project: Project }> = ({ project }) => {
// TODO -- figure out what happens if the project hasn't loaded yet
Expand Down
7 changes: 7 additions & 0 deletions ui/frontend/src/components/dashboard/Runs/RunsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
import { RunLink, VersionLink } from "../../common/CommonLinks";
import { DurationDisplay } from "../../common/Datetime";
import { adjustStatusForDuration } from "../../../utils";
import VisibilitySensor from "react-visibility-sensor";

const MAX_COMPARE_RUNS = 5;

Expand Down Expand Up @@ -353,6 +354,11 @@ export const RunsTable: FC<{
.map((run, index) => {
const runID = run.id as number;
return (
<VisibilitySensor
key={index}
offset={{ top: -1000, bottom: -1000 }}
partialVisibility={true}
>
<TableRow
projectId={projectId as number}
run={run}
Expand Down Expand Up @@ -382,6 +388,7 @@ export const RunsTable: FC<{
setRunsToCompare(Array.from(runsToCompare));
}}
/>
</VisibilitySensor>
);
})}
</tbody>
Expand Down
Loading