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

Do not create GeometryFactory in GeometryUtils too often #3243

Merged
merged 2 commits into from
May 3, 2024

Conversation

marecabo
Copy link
Contributor

This change reuses a static GeometryFactory in GeometryUtils which might improve performance for repeated calls to createGeotoolsPoint and createGeotoolsLineString.

@Janekdererste
Copy link
Member

We also have MGC which provides conversions between MATSim geotools abstractions such as Coord and Point. Possibly, this could be done there as well?

(Just a guess, I haven't checked myself)

@marecabo
Copy link
Contributor Author

marecabo commented May 3, 2024

Fortunately, this is already done there:

public static final GeometryFactory geoFac = new GeometryFactory();

@jfbischoff jfbischoff merged commit 5b67113 into matsim-org:master May 3, 2024
47 checks passed
@marecabo marecabo deleted the reuse-GeometryFactory branch May 3, 2024 14:09
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