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

Projects
None yet
3 participants
@sebasbaumh
Copy link
Contributor

commented May 13, 2019

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

This comment has been minimized.

Copy link
Contributor Author

commented May 13, 2019

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

This comment has been minimized.

Copy link
Member

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.

@sebasbaumh sebasbaumh force-pushed the sebasbaumh:threadsafeTransform branch from 5e67736 to 798d5ba May 13, 2019

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

Signed-off-by: Sebastian Baumhekel <sebastian.baumhekel@gmail.com>

@sebasbaumh sebasbaumh force-pushed the sebasbaumh:threadsafeTransform branch from 798d5ba to 91522e7 May 13, 2019

@sebasbaumh

This comment has been minimized.

Copy link
Contributor Author

commented May 13, 2019

@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

1 check passed

eclipsefdn/eca The author(s) of the pull request is covered by necessary legal agreements in order to proceed!
Details

@sebasbaumh sebasbaumh deleted the sebasbaumh:threadsafeTransform branch Jun 25, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.