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

String passing fixes #520

Merged
merged 4 commits into from
Apr 26, 2023
Merged

Conversation

donaldwj
Copy link
Contributor

[Short description explaining the high-level reason for the pull request]

Additions

Removals

Changes

Change frequently called function to take std::string& instead of std::string to avoid copys

Testing

  1. Auto test passed on USC7

Screenshots

image

Notes

Todos

Checklist

  • PR has an informative and human-readable title
  • Changes are limited to a single goal (no scope creep)
  • Code can be automatically merged (no conflicts)
  • Code follows project standards (link if applicable)
  • Passes all existing automated tests
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future todos are captured in comments
  • Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)
  • Reviewers requested with the Reviewers tool ➡️

Testing checklist (automated report can be put here)

Target Environment support

  • Linux

Copy link
Member

@hellkite500 hellkite500 left a comment

Choose a reason for hiding this comment

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

Other than the unit converter message line, everything else looks like solid string optimizations.

src/NGen.cpp Outdated
@@ -69,6 +69,8 @@ int main(int argc, char *argv[]) {
<< ngen_VERSION_PATCH << std::endl;
std::ios::sync_with_stdio(false);

ut_set_error_message_handler(ut_ignore);
Copy link
Member

Choose a reason for hiding this comment

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

need to remove this. If you want to disable unit messages, build with -DUDUNITS_QUIET

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that is a commit that somehow got from one of my profiling branches into my main and has been rebased onto code sense then.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Any it is removed

Copy link
Member

Choose a reason for hiding this comment

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

Should be good to merge, this one change shouldn't affect the tests

@hellkite500
Copy link
Member

I thought there was a larger issue about string handling for performance, but I'm not finding it, but I did want to note the relation to #443 and #444.

@donaldwj donaldwj merged commit a878152 into NOAA-OWP:master Apr 26, 2023
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.

2 participants