Skip to content

Commit

Permalink
fix: remove produce syntax from spans stream to drastically improve p…
Browse files Browse the repository at this point in the history
…erformance at 5k + entries
  • Loading branch information
johann-crabnebula committed Feb 8, 2024
1 parent 3eb0abc commit e0bedd9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
9 changes: 3 additions & 6 deletions clients/web/src/lib/connection/transport.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { InstrumentClient } from "~/lib/proto/instrument.client";
import { TauriClient } from "~/lib/proto/tauri.client";
import { SourcesClient } from "~/lib/proto/sources.client.ts";
import { MetadataClient } from "../proto/meta.client";
import { SetStoreFunction, createStore, produce } from "solid-js/store";
import { SetStoreFunction, createStore } from "solid-js/store";
import {
HealthCheckRequest,
HealthCheckResponse_ServingStatus,
Expand Down Expand Up @@ -115,11 +115,8 @@ export function addStreamListneners(

const spansUpdate = update.spansUpdate;
if (spansUpdate && spansUpdate.spanEvents.length > 0) {
setMonitorData(
"spans",
produce((clonedSpans) =>
updatedSpans(clonedSpans, spansUpdate.spanEvents)
)
setMonitorData("spans", (spans) =>
updatedSpans(spans, spansUpdate.spanEvents)
);
}
});
Expand Down
1 change: 1 addition & 0 deletions clients/web/src/views/dashboard/console.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export default function Console() {
placeholder="Filter..."
class="bg-slate-900 px-1 rounded text-white focus:outline-none focus:border focus:border-slate-400"
/>
<div>({filteredLogs().length})</div>
<LogLevelFilter filter={filter} setFilter={setFilter} />
<FilterToggle
defaultPressed
Expand Down

0 comments on commit e0bedd9

Please sign in to comment.