Skip to content
This repository was archived by the owner on Jun 18, 2026. It is now read-only.

refactor: replace List map keys with String in NetworkFlowAnalyzer - #113

Closed
sauravbhattacharya001 wants to merge 1 commit into
masterfrom
refactor/flow-analyzer-string-keys
Closed

sauravbhattacharya001 wants to merge 1 commit into
masterfrom
refactor/flow-analyzer-string-keys

Conversation

@sauravbhattacharya001

Copy link
Copy Markdown
Owner

Replace Arrays.asList(from, to) HashMap keys with simple "from->to" String keys in NetworkFlowAnalyzer.

Eliminates per-lookup List allocation and gives faster hashing (String.hashCode is cached). Zero behavioral change.

…lyzer

NetworkFlowAnalyzer used Arrays.asList(from, to) as HashMap keys for
residual capacities, flow values, and edge lookups. Every directedKey()
call allocated a new List object, and every HashMap lookup had to hash
the list contents.

Replaced with simple 'from->to' String keys via string concatenation.
This eliminates per-lookup object allocation and gives faster hashing
(String.hashCode is cached after first call).

Also removes the now-unused Arrays import.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions github-actions Bot added visualization Graph visualization and UI size/m labels Mar 23, 2026
@sauravbhattacharya001

Copy link
Copy Markdown
Owner Author

Closing: superseded or conflicting with newer changes already on main/master.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

size/m visualization Graph visualization and UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant