I have now seen, that zorro also works very slowly in TESTMODE when using "empty" adviseLS functions, even if I do not use R at all?

For testing this i have used a modified function result, no R included:
Code
else {
avl = adviseLong (NEURAL,obl,INP,ipc);
avs = adviseShort(NEURAL,obs,INP,ipc);
}

in the r. file:
else if(mode == NEURAL_PREDICT && is(TRAINMODE)) ... not used here
else if(mode == NEURAL_PREDICT && is(TESTMODE)) {return(100.0);}
else if(mode == NEURAL_PREDICT && is(TRADEMODE)) ... not used here

Quote
Multiple assets.......
WFA Test: 2016..2018
BAR_TIME_DBG | Bars 18155 | Bar 4000 | 38103.04 ms <- the first call takes longer because off the R init
BAR_TIME_DBG | Bars 18155 | Bar 5000 | 169496.21 ms <- no R involved from here, very slow
BAR_TIME_DBG | Bars 18155 | Bar 6000 | 186814.09 ms
BAR_TIME_DBG | Bars 18155 | Bar 7000 | 171797.91 ms
BAR_TIME_DBG | Bars 18155 | Bar 8000 | 175170.88 ms

In TESTMODE the runtime is high - but stable high - and not increasing.

Only calling the advise(L/S) functions and returning 100.0 takes so much time?

You can see the difference here:
Code
else {
avl = 100; // adviseLong (NEURAL,obl,INP,ipc);				
avs = 100; // adviseShort(NEURAL,obs,INP,ipc);
}

Quote
Multiple assets.......
WFA Test: 2016..2018
BAR_TIME_DBG | Bars 18155 | Bar 4000 | 292.75 ms
BAR_TIME_DBG | Bars 18155 | Bar 5000 | 829.78 ms
BAR_TIME_DBG | Bars 18155 | Bar 6000 | 817.33 ms
BAR_TIME_DBG | Bars 18155 | Bar 7000 | 867.14 ms

Currently I'm using 7 assets and 4 algos, it takes hours to train and test.

I have build a cache around NEURAL_PREDICT in TESTMODE, in the first run i save the results to a dataset that is loaded in all further runs.

Even with caching it is slow, because of the time the advise() calls already need.

So the caching only gives me a small performance boost, something inside advise() takes a lot of time, can you check this please?

Is Zorro possibly checking if R is running inside advise(NEURAL)?

Last edited by laz; 08/20/19 00:11.