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

Replace regex_split with MDAL::split in mdal_mike21.cpp #496

Merged
merged 4 commits into from
Feb 20, 2025

Conversation

aka863
Copy link
Contributor

@aka863 aka863 commented Jan 9, 2025

mike21 dirver uses regular expressions to analyze text data, it is very slow.


regex_split test

$ time ./tools/mdalinfo ./tlgs.mesh
mdalinfo 1.3.0
Mesh File: ./tlgs.mesh
Mesh loaded: OK
Driver: Mike21
Vertex count: 146054
Edge count: 0
Face count: 279552
Edge count: 0
Projection: PROJCS["CGCS2000_3_Degree_GK_CM_117E"]
Datasets loaded: OK
Groups count: 2
VertexType
Bed Elevation

real 0m40.182s
user 0m38.331s
sys 0m0.030s


MDAL::split test

$ time ./tools/mdalinfo ./tlgs.mesh
mdalinfo 1.3.0
Mesh File: ./tlgs.mesh
Mesh loaded: OK
Driver: Mike21
Vertex count: 146054
Edge count: 0
Face count: 279552
Edge count: 0
Projection: PROJCS["CGCS2000_3_Degree_GK_CM_117E"]
Datasets loaded: OK
Groups count: 2
VertexType
Bed Elevation

real 0m2.458s
user 0m0.800s
sys 0m0.042s

aka863 added 2 commits January 8, 2025 15:32
…sisting of a mix of tab characters and spaces, so we need to replace the tab characters with spaces before using the MDAL::split function to process the data.
@aka863
Copy link
Contributor Author

aka863 commented Jan 9, 2025

Copy link
Contributor

@uclaros uclaros left a comment

Choose a reason for hiding this comment

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

Thanks!
Any reason not to stick to std::replace()?

JanCaha

This comment was marked as resolved.

@JanCaha JanCaha merged commit 626ceb3 into lutraconsulting:master Feb 20, 2025
7 of 8 checks passed
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