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

Make BasicCoordinateTransform thread-safe #29

Merged
merged 1 commit into from
Jun 25, 2019

Conversation

sebasbaumh
Copy link
Contributor

Make BasicCoordinateTransform thread-safe to increase performance in multi-threaded environments by reusing the same instance.

The transform function does not need temporary variables anymore (which were the reason for having a stateful class). And inverseProjectRadians does only touch the target coordinate after calculating using the source coordinate, so it can get the same instance for both parameters.

So finally with this change it is possible to reuse a BasicCoordinateTransform across multiple threads instead of constructing one for every single thread. Especially servlets and enterprise applications transforming coordinates on a web request will benefit from it.

@sebasbaumh
Copy link
Contributor Author

How do I handle this:
Sebastian Baumhekel (sebastian.baumhekel@****.com) did not include the "Signed-off-by footer" which is required for all commits made by a contributor.

I already signed an Eclipse Contributor Agreement some time ago.

@pomadchin
Copy link
Member

pomadchin commented May 13, 2019

hey @sebasbaumh just do git commit --amend -s && git push origin -f threadsafeTransform

flag -s here would add a proper footer, just be sure that you're signing your commit with the same email you signed ECA.

multi-threaded environments by reusing the same instance.

Signed-off-by: Sebastian Baumhekel <sebastian.baumhekel@gmail.com>
@sebasbaumh
Copy link
Contributor Author

@pomadchin Thank you 👍

@echeipesh echeipesh added this to the 1.1.0 milestone Jun 25, 2019
@echeipesh echeipesh merged commit 963b5e9 into locationtech:master Jun 25, 2019
@sebasbaumh sebasbaumh deleted the threadsafeTransform branch June 25, 2019 18:30
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.

None yet

3 participants