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

Write speed to GPX 1.0 files #102

Merged
merged 1 commit into from
Feb 8, 2024
Merged

Write speed to GPX 1.0 files #102

merged 1 commit into from
Feb 8, 2024

Conversation

tpikonen
Copy link

  • I agree to follow the project's code of conduct.
  • I added an entry to CHANGELOG.md if knowledge of this change could be valuable to users.

Does what it says in the tin.

@lnicola
Copy link
Member

lnicola commented Feb 6, 2024

Maybe we should thread only the version, instead of the whole &Gpx?

@tpikonen
Copy link
Author

tpikonen commented Feb 6, 2024

I'm pretty new to Rust, but I would be surprised if function arguments are copied into the stack, especially when the value is a reference.

So, this should not be a performance issue, but maybe there are other reasons to not pass the whole type?

@lnicola
Copy link
Member

lnicola commented Feb 6, 2024

No, I'm not worried about performance. Passing the version might be a couple % faster if you ignore the I/O, but that's not the issue.

I'm thinking that we should only pass the necessary information instead of the whole thing, so the code doesn't end up looking where it shouldn't.

@tpikonen
Copy link
Author

tpikonen commented Feb 6, 2024

Here's a version which passes only gpx.version.

src/writer.rs Outdated Show resolved Hide resolved
Copy link
Member

@lnicola lnicola left a comment

Choose a reason for hiding this comment

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

Looks good to me with a single nit. I'll wait a couple of days before merging in case another maintainer wants to take a look.

@lnicola
Copy link
Member

lnicola commented Feb 8, 2024

r? @frewsxcv

@frewsxcv frewsxcv merged commit ef3ab70 into georust:master Feb 8, 2024
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.

3 participants