I can adjust parameters down until the errors go away but:
- Am I getting the absolute best usage of my memory or am I “leaving my change on the table?”
- What if a user’s PC has less memory than me, are they going to get out of memory errors?
- What if a user’s PC has a lot more memory than I do… then they really will not be able to leverage that extra memory to their advantage.
Am I missing something? Are there functions or object properties that I’ve missed? If you are a web developer working on some data intensive stuff on the client side don’t you wish you had these functions available?
One More Memory Related Thing
I assume strings may use 1 byte per character (or do they use 2 bytes to support unicode). I assume booleans take the least amount of memory (possibly 1 bit)? There are integers and floating point values… how many bytes do they use each? What is the overhead number of bytes for each variable and for each element in an array? Knowing this information could be helpful in deciding how to store information in memory the most efficient way.
This looks like an interesting JS library: something where you pass in a variable or JSON string and it returns how many bytes it takes up. I have to investigate this further when I have some time!