There is extensive use of, and reliance on, global variables throughout the codebase, which is known to degrade performance of Julia.
All instances of globally loaded variables should be replaced by using structs to specify config etc. or some other strategy.
Important: The performance enhancement should be be measured, compared, and verified using @time (or similar).