Welcome, Guest
Username: Password: Remember me

TOPIC: Speed of the mesher: regression ?

Speed of the mesher: regression ? 3 weeks 2 days ago #45880

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 781
  • Thank you received: 188
Repeated one of the previous tests...

WITH outline resampling, 1.2 edge growth ratio, default edge length 10, and no auto smoothing:
  1. With BK 3.12.23-beta; A new mesh was created with 228,277 nodes and 447,505 edges in 21.0 minutes. The mesh density ranges from 10 to 10 (i.e. it is constant).
  2. With development version; the same node and edge count mesh was created with constant density. This time the mesh creation time was 3.4 minutes

I suppose I could spend more time trying to figure out where to optimize, but for now, for this "simple" meshing case, I'm satisfied with this 6.2X speedup.

Kindly... Alan
The administrator has disabled public write access.
The following user(s) said Thank You: nicogodet

Speed of the mesher: regression ? 3 weeks 2 days ago #45881

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 781
  • Thank you received: 188
By the way... BK was not 300s... but rather 204s... a full one third better... :woohoo:

Kindly... Alan
The administrator has disabled public write access.

Speed of the mesher: regression ? 3 weeks 2 days ago #45885

  • nicogodet
  • nicogodet's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 166
  • Thank you received: 40
What changes did you do to improve that much ?
The administrator has disabled public write access.

Speed of the mesher: regression ? 3 weeks 2 days ago #45887

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 781
  • Thank you received: 188
trade secrets :silly:

But seriously though, over the last 10 years I've been moving the code base in a direction that allows (1) improved robustness and THEN (2) improved performance.

With all of my recent changes to line sets in the last week, I actually didn't do a whole lot of optimization directly for the mesher in order to see this improvement.

There is still more room for more optimization and I could make it even faster; I'm just not sure (yet) that the effort will make a large dent in the overall time. Hence the reason why I want to add more performance timing meta data and then share an installer so that people, such as yourself, can do performance comparisons and let me know your performance results. This will help me help you.

Also, this performance improvement is restricted in scope. For example, if an unoptimized object is used for density interpolation then the mesher may "slow down" again.... even though it may not be the mesher per se... but the object being used. And then I'd need to look at that particular situation in depth.

I'll continue to improve all of the code in BOTH directions, with the primary focus on correctness (as I've always done) and the secondary focus on performance. Of course, I'll focus on performance in an area if/when someone raises the topic (like what you did) and for which I appreciate.

As an aside; performance is a non-functional requirement that typically can't just be "done". It needs to be baked into everything that you do and then the improvements will slowly be seen. Well, in this case... quickly seen! :whistle:

That's my opinion anyway.

Kindly... Alan
The administrator has disabled public write access.
The following user(s) said Thank You: ah_sl

Speed of the mesher: regression ? 3 weeks 3 hours ago #45901

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 781
  • Thank you received: 188
The next installer, created after 16 Dec 2024, will contain new performance Meta Data to help you find, and then report, performance bottle necks.
  • Double click on the new mesh object and go to the Meta Data tab
  • Scroll down to see all 19 performance measurements
  • Use the "c" button (on the right hand side) to copy all Meta Data to the clipboard and paste into another program, such as a text file and open up again in Blue Kenue. Or paste into MS Excel or another program...

Kindly... Alan
The administrator has disabled public write access.
The following user(s) said Thank You: ah_sl

Speed of the mesher: regression ? 2 weeks 5 days ago #45928

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 781
  • Thank you received: 188
Please upgrade to BK 3.12.24 - beta as per post #45925 and let us know how it goes.

Kindly... Alan
The administrator has disabled public write access.
The following user(s) said Thank You: nicogodet

Speed of the mesher: regression ? 2 weeks 4 days ago #45940

  • nicogodet
  • nicogodet's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 166
  • Thank you received: 40
WOW
WOWWW

From ~1h on my laptop to 7min

Title
Name New Mesh
Type 2D T3 Scalar Mesh
Directory
Filename
NoDataValue -999
DoublePrecision False
Option_ResampleOutline True
Option_GrowThreshold 1.200000
Option_CheckGrowThreshold True
Option_DefaultEdgeLength 10.000000
Option_AutoSmoothMesh True
Option_AutoSmoothLoopCount 400
Option_ResampleLinesOnly False
Option_OverwriteMesh True
Option_NewResampler_Experimental False
Performance_ResampleShorelines 0.000 sec
Performance_ResampleSoftlines 0.000 sec
Performance_SpaceEstimation 0.000 sec
Performance_AddFixedGeometry 0.000 sec
Performance_AddOutlineNodes 0.000 sec
Performance_PrepareOutline 0.000 sec
Performance_AddDensityPolygonSeedNodes 0.000 sec
Performance_ComputeInteriorNodes 3.0 min
Performance_GenerateNodes 0.000 sec
Performance_Triangulation 2 sec
Performance_DoCullSmallElements 0.000 sec
Performance_DoCullElementsOutside 37 sec
Performance_ValidateOuterEdgeElements 0.000 sec
Performance_RemoveUnusedNodes 0.000 sec
Performance_FinalizeSubmeshAndIslandEdgeConnectivity 3.3 min
Performance_InitNewMeshAttributesAndActivateMesh 0.000 sec
Performance_AutoSmoothMesh 6 sec
Performance_DoMakeAllElementsCounterClockWise 0.000 sec
Performance_Cleanup 0.000 sec
Performance_DoGenerateMesh 7.0 min

The finalize part takes quite some time but this is MUCH better
The administrator has disabled public write access.
The following user(s) said Thank You: a.barton

Speed of the mesher: regression ? 2 weeks 4 days ago #45943

  • nicogodet
  • nicogodet's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 166
  • Thank you received: 40
With a more classic project (hardlines, submeshes and larger default cell size)

Title
Name New Mesh
Type 2D T3 Scalar Mesh
Directory
Filename
NoDataValue -999
DoublePrecision False
Option_ResampleOutline_2 True
Option_GrowThreshold_2 1.200000
Option_CheckGrowThreshold_2 True
Option_DefaultEdgeLength_2 35.000000
Option_AutoSmoothMesh_2 True
Option_AutoSmoothLoopCount_2 400
Option_ResampleLinesOnly_2 False
Option_OverwriteMesh_2 True
Option_NewResampler_Experimental_2 False
Performance_ResampleShorelines_2 0.000 sec
Performance_ResampleSoftlines_2 0.000 sec
Performance_SpaceEstimation_2 0.000 sec
Performance_AddFixedGeometry_2 2 sec
Performance_AddOutlineNodes_2 0.000 sec
Performance_PrepareOutline_2 0.000 sec
Performance_AddDensityPolygonSeedNodes_2 0.000 sec
Performance_ComputeInteriorNodes_2 2.5 min
Performance_GenerateNodes_2 7 sec
Performance_Triangulation_2 1.000 sec
Performance_DoCullSmallElements_2 0.000 sec
Performance_DoCullElementsOutside_2 5 sec
Performance_ValidateOuterEdgeElements_2 3.1 min
Performance_RemoveUnusedNodes_2 4 sec
Performance_MergeSubMeshes_2 2.0 min
Performance_FinalizeSubmeshAndIslandEdgeConnectivity_2 5 sec
Performance_InitNewMeshAttributesAndActivateMesh_2 0.000 sec
Performance_AutoSmoothMesh_2 3 sec
Performance_DoMakeAllElementsCounterClockWise_2 0.000 sec
Performance_Cleanup_2 0.000 sec
Performance_DoGenerateMesh_2 8.0 min
SourceFile
The administrator has disabled public write access.

Speed of the mesher: regression ? 2 weeks 4 days ago #45946

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 781
  • Thank you received: 188
How does this overall time of 8 min. compare with BK 3.3.4 running with your same example data?
  • I'm wondering if BK 3.12.24 - beta is performing at least as well as 3.3.4 was for you

Kindly... Alan
The administrator has disabled public write access.

Speed of the mesher: regression ? 2 weeks 1 hour ago #45985

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 781
  • Thank you received: 188
Please upgrade to BK 3.12.25 - beta as per post #45980

Kindly... Alan
The administrator has disabled public write access.
Moderators: Serrer, a.barton

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.