Skip to content

improve TimeSeries split performance#3933

Open
samirromdhani wants to merge 5 commits into
fix/1609-split-time-series-and-toarray-wastes-a-lot-memoryfrom
fix/1634-timeseries-split-quadratic-performance-for-many-small-chunks
Open

improve TimeSeries split performance#3933
samirromdhani wants to merge 5 commits into
fix/1609-split-time-series-and-toarray-wastes-a-lot-memoryfrom
fix/1634-timeseries-split-quadratic-performance-for-many-small-chunks

Conversation

@samirromdhani
Copy link
Copy Markdown
Contributor

@samirromdhani samirromdhani commented May 29, 2026

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • A PR or issue has been opened in all impacted repositories (if any)

Does this PR already have an issue describing the problem?

Fixes #1634

What kind of change does this PR introduce?

What is the current behavior?

What is the new behavior (if this is a feature change)?

Does this PR introduce a breaking change or deprecate an API?

  • Yes
  • No

If yes, please check if the following requirements are fulfilled

  • The Breaking Change or Deprecated label has been added
  • The migration steps are described in the following section

What changes might users need to make in their application due to this PR? (migration steps)

  • The default behavior of the split method was changed to improve performance in both execution time and memory consumption.
  • A new method was introduced:toCompactArray, split now uses that.
  • toArray still available, users can choose toCompactArray for improved memory usage.

Other information:

powsybl-benchmark way with tsSize = 100000:

Benchmark     Mode  Cnt        Score   Error  Units
splitV0       avgt       3276192,839          us/op       <- split before performance improvement
split         avgt          3236,725          us/op       <- split after performance improvement

splitV0:gc.alloc.rate.norm  avgt       40016480045,333            B/op  <- split before performance improvement
split:gc.alloc.rate.norm    avgt           6801644,438            B/op <- split after performance improvement

@samirromdhani samirromdhani changed the base branch from main to fix/1609-split-time-series-and-toarray-wastes-a-lot-memory May 29, 2026 15:47
@samirromdhani samirromdhani force-pushed the fix/1634-timeseries-split-quadratic-performance-for-many-small-chunks branch 8 times, most recently from fc02f7c to 2865686 Compare June 1, 2026 14:17
@samirromdhani samirromdhani self-assigned this Jun 1, 2026
@samirromdhani samirromdhani marked this pull request as ready for review June 1, 2026 15:26
@samirromdhani samirromdhani changed the title WIP: improve TimeSeries split performance improve TimeSeries split performance Jun 1, 2026
@samirromdhani samirromdhani marked this pull request as draft June 2, 2026 09:28
@samirromdhani samirromdhani force-pushed the fix/1609-split-time-series-and-toarray-wastes-a-lot-memory branch from 64b7a54 to 08453cf Compare June 2, 2026 13:40
Signed-off-by: Samir Romdhani <samir.romdhani_externe@rte-france.com>
Signed-off-by: Samir Romdhani <samir.romdhani_externe@rte-france.com>
Signed-off-by: Samir Romdhani <samir.romdhani_externe@rte-france.com>
Signed-off-by: Samir Romdhani <samir.romdhani_externe@rte-france.com>
@samirromdhani samirromdhani force-pushed the fix/1634-timeseries-split-quadratic-performance-for-many-small-chunks branch from c0615ef to 6811406 Compare June 3, 2026 12:33
Signed-off-by: Samir Romdhani <samir.romdhani_externe@rte-france.com>
@samirromdhani samirromdhani force-pushed the fix/1634-timeseries-split-quadratic-performance-for-many-small-chunks branch from 6811406 to 1a27bd3 Compare June 3, 2026 12:38
@samirromdhani samirromdhani marked this pull request as ready for review June 3, 2026 12:44
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jun 3, 2026

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Timeseries split quadratic performance for many small chunks

1 participant