0

I’m developing a JavaScript App (using React, Redux...). My app need some metadata to work, to display objects in trees or in tables...

I’m just wondering if I should load all these metadata from the server in one shot and keep them in a memory or if I should perform each time requests to get only what I need to minimize the memory footprint.

My data are not so big, maybe 1 or 2 MB.

I wonder how much memory I can rely on in general in browser ?

What is the order of magnitude 10MB, 100MB, 1GB...?

sebastien
  • 2,489
  • 5
  • 26
  • 47

2 Answers2

1

There's no upper limit. However, being conservative in memory usage is smart. Nobody likes a hungry web application.

Evert
  • 93,428
  • 18
  • 118
  • 189
1

Yes, You can use based on browser,but max you can check with these code in console

window.performance.memory.jsHeapSizeLimit 

If you are using chrome 32 bit, then JS heap is limited to ~756MB

nisar
  • 1,055
  • 2
  • 11
  • 26