Hello,
Thank you very much for your e-mail.
Normally it is not re-loaded unless you use #pragma nocache
Best regards,
Tomasz Janeczko
amibroker.com
On 2016-02-18 17:05, jr-sw jr-sw@liberator-systems.co.uk [amibroker] wrote:
Tomasz
Curious to know why #include incurs any execution performance hit. I would have expected any #includes to be pre(processed) once only or is this not the case?
John
On 18/02/2016 12:55, Tomasz Janeczko groups@amibroker.com [amibroker] wrote:
Hello,
Thank you very much for your e-mail.
It is wrong approach. AFL is not C/C++.
C/C++ programmers tend to create hundreds of small files.
Don't do that in AFL. One, two #included files are good choice.
In AFL #includes are intended to be used only for
well-tested and already tested "library" functions that are used in MANY formulas.
(say you have an indicator that you want to use in many places).
Any under-development code should be in the main file.
That simplifies a lot of things.
Managing 15000 line file is not a problem. There is a code folding,
bookmarks, etc.
I don't know what you are doing but 15000 lines in AFL?
Are you doing some kind of machine learning or neural networks?
If so, personally I would put that in DLL.
Best regards,
Tomasz Janeczko
amibroker.com
On 2016-02-18 09:30, 'B. Pitatzidis' bobptz@gmail.com [amibroker] wrote:
I am trying to make my scripts very modular. Small main programs with lots of functions.
Actually my main afl sript is less than 20 lines. Right now my project totals about 1500 lines and I estimate that it will grow to more than 15.000 lines.
Is it a design flaw to use many #include files? I find it very impractical to have a huge afl script with 15.000 lines.
The documentation of the #include warns about a drawback of using #include:
"Note 2: using #include command may slow down formula execution even considering the fact that AmiBroker tries to include only once and cache pre-processed text"
https://www.amibroker.com/guide/afl/_include.html
I have not benchmarked it, but I hope the delay is not much.
Lately I discovered that the new AB debugger will not allow breakpoints in included files. This rules out the use of the debugger for my kind of design.
This made me think that I might be doing something wrong.
__._,_.___
Posted by: Tomasz Janeczko <groups@amibroker.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (6) |
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
.
__,_._,___
EmoticonEmoticon