Skip to content

Commit

Permalink
Merge branch 'w2p-122357_prevent-request-urls-from-being-fired-multip…
Browse files Browse the repository at this point in the history
…le-times-7.4' into w2p-122357_browse-performance-fixes_contribute-main
  • Loading branch information
alexandrevryghem committed Jan 16, 2025
2 parents c3e635b + 3ecdfe4 commit 89281d7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/app/core/data/base/base-data.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
from as observableFrom,
Observable,
of as observableOf,
shareReplay,
} from 'rxjs';
import {
map,
Expand Down Expand Up @@ -288,6 +289,10 @@ export class BaseDataService<T extends CacheableObject> implements HALDataServic
isNotEmptyOperator(),
take(1),
map((href: string) => this.buildHrefFromFindOptions(href, {}, [], ...linksToFollow)),
shareReplay({
bufferSize: 1,
refCount: true,
}),
);

const startTime: number = new Date().getTime();
Expand Down Expand Up @@ -343,6 +348,10 @@ export class BaseDataService<T extends CacheableObject> implements HALDataServic
isNotEmptyOperator(),
take(1),
map((href: string) => this.buildHrefFromFindOptions(href, options, [], ...linksToFollow)),
shareReplay({
bufferSize: 1,
refCount: true,
}),
);

const startTime: number = new Date().getTime();
Expand Down

0 comments on commit 89281d7

Please sign in to comment.