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

Avoid duplicating path string in ExpandFilePath #247

Open
wants to merge 1 commit into
base: release
Choose a base branch
from

Conversation

moretromain
Copy link

@moretromain moretromain commented Feb 20, 2020

Changing signature of ExpandFilePath() to avoid extra string copies/allocations

@syoyo
Copy link
Owner

syoyo commented Feb 21, 2020

Changing API will affect programs using tinygltf, so I don't want to merge this change unless this change give significant performance improvement(but looks no)

@moretromain
Copy link
Author

I understand this affects the API and might break some existing code. On our end, we use a custom set of FSCallbacks, and our ExpandFilePath() doesn't do anything. But with the actual signature, we still need to return an extra copy of the input argument.
We're in a context where we really need to minimize allocations and string copies as much as we can, so I thought this would be a welcome change. I understand if you don't want to break the current API though..
Thanks!

@syoyo syoyo added the trivial label Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants