I have an application written in AFL with the help of a C++ plug-in. It loads quite a lot of static variables upon startup using a bunch of #include_once statements like this,
#include_once "Formulas\Include\Runbooks\USMaster\Runbook_USMaster.afl"
#include_once "Formulas\Include\Runbooks\P1Master\Runbook_P1Master.afl"
#include_once "Formulas\Include\Runbooks\P2Master\Runbook_P2Master.afl"
#include_once "Formulas\Include\Runbooks\USGvtBnd\Runbook_USGvtBnd.afl"
<... and so forth ... about 50 such statements ...>
In each of these files, there is a list of variables modularized according the name of an associated watchlist and stored in static variables like so,
StaticVarSetText(WLNAME+"triggerList", TRIGGERLIST, True);
StaticVarSetText(WLNAME+"nearVol", NEARTERM_VOLATILITY, True);
StaticVarSetText(WLNAME+"midVol", MIDTERM_VOLATILITY, True);
StaticVarSet(WLNAME+"omegaType", OMEGA_SWITCH, True);
StaticVarSet(WLNAME+"omegaCashType", OMEGA_CASHSWITCH, True);
StaticVarSet(WLNAME+"omegaTrade", OMEGA_TRADESWITCH, True);
StaticVarSet(WLNAME+"slowlb", SLOWLB_MULTIPLIER, True);
StaticVarSet(WLNAME+"fastlb", FASTLB_MULTIPLIER, True);
<and so forth... there are about 80 such variables for each module>
In total, this is about 4000 static variables being stored. Additionally, there are various other places where static variables are created and stored during run-time.
With the latest module I've added, I've run into a situation where the very last variable isn't being created or updated when the program loads. I haven't been able to find a reason for this and am wondering if I've bumped into some limit AB has on the number of static vars which can be in the DB? If so, what is it? Knowing would help me plan any winnowing I might need to do.