This commit introduces several performance improvements:
- Optimized `scripts/test_automation.py` by replacing `ProcessPoolExecutor` with sequential execution, reducing CPU overhead for short-lived tasks.
- Optimized `scripts/ci_validate_repo.py` by using `os.walk` and chunked file reading (64KB), improving memory efficiency and traversal speed.
- Optimized `ExpertMAPSARSizeOptimized_Improved.mq5` by implementing 1-second caching for environment API calls (`TerminalInfoInteger`, `MQLInfoInteger`) in the `IsTradingAllowed` hot path.
These changes were verified with benchmarks and existing tests.
- Consolidate file validation logic into a single loop
- Check file size before reading content to prevent loading large files into memory
- Add error handling for file reading
- Reduce I/O operations and loop iterations
This improves the efficiency of the CI validation script, especially for repositories with many files or when large files are accidentally introduced.