MT5 RAM memory voraciousness, problems with reading/writing large files - page 8

 
Horror
 
Алексей Тарабанов:
Horror

Emotions are very important in understanding a person's attitude. However, it is not a bad idea to understand what such strong emotions are expressed in relation to?

 

Let me lighten the mood a bit. I remembered a joke about horror.

A customer comes into a brothel. They give him a girl, they go upstairs. After a minute, the girl runs out of the room and screams "Horror, horror!" and runs away. Okay, they give him the second one. She goes into the room, a minute later she runs out screaming "horror, horror!" and runs away too. But the client needs to be served. Then the landlady herself goes to him. An hour goes by. She comes out staggering. She says: "Well, the horror... But not horror-horror!" )))

 
Aleksey Vyazmikin:

Have you checked and found no acceleration? Or are you saying that I am misleading everyone here?

You don't even have to check here. There will be almost no acceleration from such a change because, as in mathematics, "the sum does not change with the change of the places of the sums". So the fallacy is obvious.

Aleksey Vyazmikin:

Do you read this thread carefully? Have you seen my answer to the ready solution as a function? Do you have another solution? Of course, I don't know what OOP is, a careful reader of this branch would have noticed it at once...

There is always "another solution". But "another solution" in this case is inaccessible because of the lack of knowledge.

Aleksey Vyazmikin:

About profitability/free - that's ridiculous, I just showed that paid solutions don't make them better than free ones, but you are talking about money again...

Nothing has been shown. A paid solution does its job just fine, but it's used in the wrong way.

Either you pay or you learn - it is the law of the modern world.

It is a total nightmare and chaos here.

 
Roffild:

You don't even have to check here. There will be almost no acceleration from such a change because, as in mathematics, "the sum does not change with the change of the places of the sums". So the fallacy is obvious.

Well, how can you be so self-righteous...

Roffild:

There is always "another solution". But "another solution" in this case is not available due to lack of knowledge.

So let people with knowledge speak out on the merits, if you have no need to help, what moves you?

Roffild:

Nothing has been shown. The paid solution does its job just fine, but it's used in the wrong way.

Either you pay or you learn - the law of the modern world.

It's a total nightmare and chaos here.

Can you tell me how I should use a class written according to my TOR for my purposes?

 
Aleksey Vyazmikin:

Well, how can you be so self-righteous...

So let people with knowledge have their say on the merits, if you don't have a need to help, what drives you?

Can you tell me how I should use a class written according to my TOR for my purposes?

The arrogance gives me a lot of experience in programming such tasks.

Everyone has already spoken out on the merits. Even fxsaber gave a link to a solution. But all real solutions have been rejected or ignored.

The class is good, but the ToR was clearly not drafted correctly for purposes that no one understands.

If it's so hard to read a CSV file in 10 lines of code, maybe you shouldn't do it yourself?

 
Roffild:

What gives me the confidence is a lot of experience in programming such tasks.

Everyone has already spoken out on the merits. Even fxsaber gave a link to a solution. But all real solutions were rejected or ignored.

The class is good, but the ToR was clearly not drafted correctly for a purpose no one understands.

If it's so hard to read a CSV file in 10 lines of code, maybe you shouldn't do it yourself?

Your contribution to the thread is clear.

 

I can offer my own solution. Below is the test code and the result. The file is 140Mb in size and has 2000000 records. Task Manager looked at 270MB of memory usage (max minus the amount without the script)

   ulong lc1=GetTickCount();
   CSV *csv=new CSV();
   csv.Read_from_file("fff0.csv",true);//Чтение с файла с автоматической конвертацией в нужный формат
   csv.Write_to_file("fff1.csv",true); //Запись в файл
   Print(csv.Get_info());              //Вывод информации о таблице(столбцы, строки, типы данных для каждого столбца)
   Print(GetTickCount()-lc1);          //Вывод времени работы
   delete csv;


Here is an example of CSV file used in the test:

boooool;dooooouble;enuuuuuum;looooooong;striiiiiiign;tiiiiiime
FALSE;0.00000000;ORDER_TYPE_BUY;0;0;1970.01.01 00:00
TRUE;1.00000000;ORDER_TYPE_SELL;1;1;1970.01.01 00:00
FALSE;2.00000000;ORDER_TYPE_BUY_LIMIT;2;2;1970.01.01 00:00
FALSE;3.00000000;ORDER_TYPE_SELL_LIMIT;3;3;1970.01.01 00:00

Saving the file without counting enumerations

boooool;dooooouble;enuuuuuum;looooooong;striiiiiiign;tiiiiiime
0;0.00000000;8;0;0;1970.01.01 00:00
1;1.00000000;0;1;1;1970.01.01 00:00
0;2.00000000;1;2;2;1970.01.01 00:00
0;3.00000000;2;3;3;1970.01.01 00:00
 
Aliaksandr Hryshyn:

I can offer my own solution. Below is the test code and the result. The file is 140Mb in size and has 2000000 records. Task Manager looked at 270MB of memory usage (max minus the amount without the script)


Here is an example of CSV file used in the test:

Saving file without counting enumerations

Great! Agreed to try out your solution.