Skip to content

fix: Improve logic around grid.get_branches() for better performance#245

Merged
vincentkoppen merged 3 commits into
PowerGridModel:mainfrom
JohanMeppelinkDRA:feature/faster-get-branches
May 7, 2026
Merged

fix: Improve logic around grid.get_branches() for better performance#245
vincentkoppen merged 3 commits into
PowerGridModel:mainfrom
JohanMeppelinkDRA:feature/faster-get-branches

Conversation

@JohanMeppelinkDRA

@JohanMeppelinkDRA JohanMeppelinkDRA commented May 7, 2026

Copy link
Copy Markdown
Contributor

Fixes #238

Changes proposed in this PR include

Concatenate once is faster. So we now prepare the arrays in the list and concatenate once instead of concatenate each individually. This will help speed-up the get_branches function.

JOHAN added 2 commits May 7, 2026 09:45
I, JOHAN <johan.meppelink@alliander.com>, hereby add my Signed-off-by to this commit: c859549

Signed-off-by: JOHAN <johan.meppelink@alliander.com>

@Thijss Thijss left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@Thijss Thijss changed the title Faster get branches fix: Improve logic around grid.get_branches() for better performance May 7, 2026

@vincentkoppen vincentkoppen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement, thanks!
Looks good to me as well.

@vincentkoppen vincentkoppen merged commit 4273606 into PowerGridModel:main May 7, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[IMPROVEMENT] concatenate once for better performance

3 participants