Questions on OOP in MQL5 - page 64

 
Igor Makanu:

imho, great job, there are of course questions as to how quickly you did it.... if this is within the space of an hour.... well that's kind of over the top!

checked the revised version - ok, everything works correctly


This tweak? Right from the start, about 30 minutes in total.

 
Vladimir Simakov:

This craft? From the beginning, a grand total of 30 minutes.

I won't flatter.

thanks again!

ZS: what's that for? one of the uses - in this codehttps://www.mql5.com/ru/forum/325418/page4#comment_16116740

you can load/save several objects through a file and also you can add the object generated by the tester to the runtime via input string without stopping EA execution, I already did it through binary exchange, but json is good - you can read it without additional manipulation

 
Igor Makanu:

I won't flatter.

thanks again!

ZS: what's that for? one of the uses - in this codehttps://www.mql5.com/ru/forum/325418/page4#comment_16116740

I can load/save several objects through a file, and also I can add the object generated by the tester to the runtime via input string without stopping EA execution, I already did it through binary exchange, but what's good about json - it can be read without additional manipulation

Just for internal use - it's easier to binary data, IMHO. JSON, though, is more for data exchange over the network, there, on the receiving / transmitting time, time for serialization / deserialization, doesn't mean anything. And so, if you need to organize an exchange on one machine, then, IMHO, File mapping is the best, and fast and easy, and on the network - there web soccet will rule.

 
Vladimir Simakov:

For internal use, it's easier to use binary data, IMHO. JSON, all the same, is more for data exchange over network, there, on the background of time of reception/transmission, time for serialization/deserialization, does not mean anything. If we need to organize data exchange on one machine, then, IMHO, File mapping is the best, fast and easy, and over network - web soccet will rule here.

No, the data exchange is already done and working - binary data through the database Redis - exchange speed microseconds - the volume of exchange ... well, seems not limited to test 600 mb with no problems, and synchronization is provided, through template all wrappers, write read in one command - in general, without much effort, everything runs smoothly and reliably

json to read/store in a file - one time operation and as I wrote to get a chance to do something in time

the task is roughly formulated like thishttps://www.mql5.com/ru/forum/85652/page50#comment_16415557 , in general I move as described )))

 
Igor Makanu:

no, data exchange already done and working - binary data via Redis database - microsecond exchange rate - exchange volume... well, seems not limited to 600 mb with no problems, and synchronization is provided, through template all wrappers, write read in one command - in general without much effort, everything works quickly and reliably

json to read/store in a file - one time operation and as I wrote to get a chance to do something in time

the problem is nearly formulated that wayhttps://www.mql5.com/ru/forum/85652/page50#comment_16415557 , in general, i am following the description )))


What version of Redis ?

I'm just looking forward to Streams 5 feature, otherwise redis is not so interesting... And where can i get 5 for windows ?

 
Maxim Kuznetsov:


Redis what version ?

I have a local under Windows, purely for memory sharing

Redis 3.2.100 64 bit

didn't really think it through, wrapped in ServiceStack.Redis dll from githab, not knowing the material - a couple of days' work


Maxim Kuznetsov:

And where can I get 5 for Windows?

It's not available. The Windows project was abandoned long ago.

but there is a lot of information on the net how to run linux software on vin 10https://redislabs.com/blog/redis-on-windows-10/

 
Vladimir Simakov:

What's the problem, allocate 12 bytes of memory on the stack, don't know for sure what a string object is?

What a bummer!

1 - by creating an object. 2 - just through a normal function call. The first number is time in milliseconds, don't pay attention to the second one.

It is almost 10 times faster (and sometimes more than 10 times faster). What a sad thing... stack... pile... ***cha

 
Dmitry Fedoseev:

What a bummer!

1 - Through object creation. 2 - simply through a normal function call. The first number is the time in milliseconds, don't pay attention to the second one.

It's almost 10 times faster (and sometimes more than 10 times faster). What a sad thing... stack... pile... ***cha.

Consider it like in C# - the object is always in the heap. Only scalars, descriptors and (as an exception) some arrays of known size are on the stack.

 
Maxim Kuznetsov:

Think of it as C# - the object is always in the heap. Only scalars, descriptors and (as an exception) some arrays of known size are on the stack.

You forgot about structures and classes (without new) - they are both allocated on the stack.

 
Dmitry Fedoseev:

What a bummer!
1 - through object creation. 2 - simply through a normal function call. The first number is the time in milliseconds, don't pay attention to the second one.
It's almost 10 times faster (and sometimes more than 10 times faster). What a sad thing... stack... pile... ***cha.

Can you explain what this is all about, because I'm a bit dumb, I've read it three times and still don't get it...

Reason: