Reduce Ram Memory - page 2

 

Basically software profiling once you find a solution you can see how it affects performance.

Good luck

 
Eric Sebestyen Ferreira #:
So what would you recommend Inbmy problem? I have  up to 400 symbols each one has up 40 months and each month I have up 300 options symbols with up to 30 parameters each, like (expire date, strike, price, volumes...). The symbols came from a file and change the amounts of options every day. I woul like to resize this 3 dimension matrix each time that my ea read the file.
I can't resize in 2 or 3 dimension, but if I leave a fixed matrix it consumes a absurd of ram memory.
Use a database and load the data from it when you need it.
 
Alexandre Borela #: Use a database and load the data from it when you need it.

If the OP is having difficulty structuring his data, then he will have even more difficulty coding it to handle an external database.

 
Fernando Carreiro #:

If the OP is having difficulty structuring his data, then he will have even more difficulty coding it to handle an external database.

Does not look like the issue is the structure, he might have a valid use case for having it like that, the issue is trying to mantain
all that data in ram. My guess is that he does not know that MQL5 even has native support to databases.

Imagine if companies like EA/Epic Games/Steam loaded their entire user base in ram, just to sometimes check user/password,
other times show the user's name on a page, etc... they would need terabytes of ram. That's pretty much what he is doing right now.

 
Alexandre Borela #:

Does not look like the issue is the structure, he might have a valid use case for having it like that, the issue is trying to mantain
all that data in ram. My guess is that he does not know that MQL5 even has native support to databases.

Imagine if companies like EA/Epic Games/Steam loaded their entire user base in ram, just to sometimes check user/password,
other times show the user's name on a page, etc... they would need terabytes of ram. That's pretty much what he is doing right now.

The reason the OP is having RAM issues is not because it is a large dataset, but because he is preallocating too much space as he does not know how to dimension it correctly on the fly.
 
Fernando Carreiro #:
The reason the OP is having RAM issues is not because it is a large dataset, but because he is preallocating too much space as he does not know how to dimension it correctly on the fly.

He stated that he allocated that much ram to account for all scenarios, so that means that the dataset is indeed large, using dynamic
array will eventually bring him back to this very issue sooner or later. The database option is the only one that will scale further
if he decides for example that needs 200 months instead of 40.