Skip to content

Commit 0495b2d

Browse files
authored
feat: memoize record method call so it is only called once (#858)
1 parent 1b54d53 commit 0495b2d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

projects/distributed-tracing/src/shared/components/log-events/log-events-table.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export const enum LogEventsTableViewType {
3737
<ng-template #detailContent let-row="row">
3838
<div class="content">
3939
<ht-list-view
40-
[records]="this.getLogEventAttributeRecords(row.attributes)"
40+
[records]="this.getLogEventAttributeRecords | htMemoize: row.attributes"
4141
[header]="this.header"
4242
data-sensitive-pii
4343
></ht-list-view>

projects/distributed-tracing/src/shared/components/log-events/log-events-table.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { CommonModule } from '@angular/common';
22
import { NgModule } from '@angular/core';
3-
import { FormattingModule } from '@hypertrace/common';
3+
import { FormattingModule, MemoizeModule } from '@hypertrace/common';
44
import { IconModule, ListViewModule, TableModule, TooltipModule } from '@hypertrace/components';
55
import { LogEventsTableComponent } from './log-events-table.component';
66
@NgModule({
7-
imports: [CommonModule, TableModule, IconModule, TooltipModule, FormattingModule, ListViewModule],
7+
imports: [CommonModule, TableModule, IconModule, TooltipModule, FormattingModule, ListViewModule, MemoizeModule],
88
declarations: [LogEventsTableComponent],
99
exports: [LogEventsTableComponent]
1010
})

0 commit comments

Comments
 (0)