Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix performance issue with boost::range::join #225

Merged
merged 3 commits into from
Nov 27, 2020

Conversation

mathbagu
Copy link

Please check if the PR fulfills these requirements (please use '[x]' to check the checkboxes, or submit the PR and then click the checkboxes)

  • 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)

Does this PR already have an issue describing the problem ? If so, link to this issue using '#XXX' and skip the rest
#44

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Performance

What is the current behavior? (You can also link to an open issue here)
The usage of boost::range::join in a for loop in not efficient and can lead to a memory crash (OOMKiller) as explained in boostorg/range#118.

What is the new behavior (if this is a feature change)?
A custom iterator has been implemented to flatten a range of ranges. The design is based on this implementation with additional changes:

  • fix handling of empty ranges
  • defined the pipe operator to chain ranges operations

Does this PR introduce a breaking change or deprecate an API? If yes, check the following:

  • The Breaking Change or Deprecated label has been added
  • The migration guide has been updated in the github wiki (What changes might users need to make in their application due to this PR?)

Other information:

(if any of the questions/checkboxes don't apply, please delete them entirely)

Signed-off-by: Mathieu BAGUE <mathieu.bague@rte-france.com>
@mathbagu mathbagu added bug Something isn't working PR: waiting-for-review labels Nov 27, 2020
@mathbagu mathbagu requested a review from sebalaig November 27, 2020 15:51
Signed-off-by: Mathieu BAGUE <mathieu.bague@rte-france.com>
Signed-off-by: Mathieu BAGUE <mathieu.bague@rte-france.com>
@sonarcloud
Copy link

sonarcloud bot commented Nov 27, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

59.5% 59.5% Coverage
0.0% 0.0% Duplication

@mathbagu mathbagu merged commit 80cc7af into integration/v1.3.0 Nov 27, 2020
@mathbagu mathbagu deleted the fix-flattening-issue branch November 27, 2020 17:12
sebalaig pushed a commit that referenced this pull request Jan 8, 2021
Signed-off-by: Mathieu BAGUE <mathieu.bague@rte-france.com>
sebalaig pushed a commit that referenced this pull request Jan 8, 2021
Signed-off-by: Mathieu BAGUE <mathieu.bague@rte-france.com>
mathbagu pushed a commit that referenced this pull request Jan 15, 2021
Signed-off-by: Mathieu BAGUE <mathieu.bague@rte-france.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working PR: waiting-for-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants