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

Does decorated variable stays at memory? #52

Open
darron1217 opened this issue Jun 19, 2018 · 2 comments
Open

Does decorated variable stays at memory? #52

darron1217 opened this issue Jun 19, 2018 · 2 comments

Comments

@darron1217
Copy link

I needed to handle huge variable like 'history of object changes'.

So I used @SessionStorage() decorator to reduce memory usage on my app. like below

@SessionStorage() histories: any;

My question is, will it really reduce my memory usage on browser?
Or if I'm doing wrong, how can I save memories using this plugin?

@DanielKucal
Copy link
Member

Hi Darron, the decorator keeps saved object as a proxy to reduce operations on the data. Maybe this is a subject for improvement (like additional configuration)... For now, I'd suggest you to just use sessionStorageService for such a heavy data.

@michelcve
Copy link

Ah, I was wondering the same (will be using it for a HttpInterceptor caching service).

Guess I will be using sessionStorageService as well, but just wanted to let you know that I'm looking at the same scenario.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants