TradingAgents/tradingagents
google-labs-jules[bot] 7ab7cd7591 perf: lazy load json parsing in PortfolioSnapshot
This commit optimizes `PortfolioSnapshot` instantiation when loaded from the DB or JSON dictionaries by removing the immediate `json.loads(holdings_snapshot)` parsing inside the `from_dict` constructor. Instead, it overrides `__getattribute__` to implement a lazy-loading pattern, where the `holdings_snapshot` string is only parsed into a Python dictionary the very first time the field is accessed.

    This optimization ensures that parsing large JSON payloads doesn't block the instantiation of snapshots, which is particularly beneficial in workflows that load a large historical series of snapshots but never access their `holdings_snapshot` field.

Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com>
2026-03-21 08:32:52 +00:00
..
agents 🧹 chore: remove unused json import in research_manager.py 2026-03-21 01:52:39 +00:00
dataflows 🧹 Remove unused `timedelta` import in finnhub_indicators.py 2026-03-21 01:54:05 +00:00
graph Implement Portfolio Manager Phases 2-5: risk evaluation, candidate prioritization, holding reviewer agent, PM decision agent, trade executor, and portfolio graph orchestration 2026-03-20 14:44:22 +00:00
llm_clients Sync fork with upstream TauricResearch/TradingAgents (v0.2.1) (#12) 2026-03-18 07:00:37 +01:00
pipeline feat: unified report paths, structured observability logging, and memory system update (#22) 2026-03-19 09:06:40 +01:00
portfolio perf: lazy load json parsing in PortfolioSnapshot 2026-03-21 08:32:52 +00:00
__init__.py Sync fork with upstream TauricResearch/TradingAgents (v0.2.1) (#12) 2026-03-18 07:00:37 +01:00
daily_digest.py feat: daily digest consolidation and Google NotebookLM sync (#23) 2026-03-19 12:21:03 +01:00
default_config.py fix(tests): complete PR #26 — enforce socket isolation in unit tier and add test suite reference doc (#30) 2026-03-19 17:41:25 +01:00
notebook_sync.py feat: NotebookLM sync with date-specific sources and consolidation (#28) 2026-03-19 15:39:25 +01:00
observability.py feat: unified report paths, structured observability logging, and memory system update (#22) 2026-03-19 09:06:40 +01:00
report_paths.py feat: daily digest consolidation and Google NotebookLM sync (#23) 2026-03-19 12:21:03 +01:00