I have an Angular application in which as soon as someone goes on to it, it grabs all the data it needs for the entire application and then shares it across all it's components (I realize there's two different ways to approach it, but I think grabbing it all at once vs. Just In time makes sense). Anyway, I notice when I click home (which causes a reload of the application, and thus grabs all the data again), the memory usage on my application jumps consistently?
Here is my service.ts:
private allWebsiteInformation = httpResource<AllWebsiteInformationModel>(() => this.allWebsiteInformationUrl);
allWebsiteInformationTwo = computed(() => {
return this.allWebsiteInformation.value();
});
And then throughout each component I do:
homeInfo = this.dataService.allWebsiteInformationTwo;
I then have this code that calls /home:
<a href="/home">
But is this normal for my application to constantly get a bigger memory heap everytime I refresh the application? I thought angular would just cache the call and then thats it.
If you look at my screen shots, it starts at 253MB, then just after a few refreshes its at 330MB? Do I need to add an RxJS operator?