Skip to content

Improve Mesh_3 memory footprint - #9331

Open
MaelRL wants to merge 129 commits into
CGAL:mainfrom
MaelRL:Mesh_3-memory-culling-GF
Open

MaelRL wants to merge 129 commits into
CGAL:mainfrom
MaelRL:Mesh_3-memory-culling-GF

Conversation

@MaelRL

@MaelRL MaelRL commented Feb 17, 2026 •

Copy link
Copy Markdown
Member

heaptrack | vtune | usr/bin/time

  • mesh vertex base: number_of_incident_facets_ and number_of_components_ to int (or even smaller)?
  • get rid of sliver_value and use a local unordered_map<Cell_handle, sliver_value> in the optimizers?
  • get rid of subdomain index? ==> could be interesting because not all cells are in the domain, due to alignment, we gain nothing at the moment
  • canonical facets in the C3T3 map (more complex than it seems: the canonical facet could be in the conflict zone, but the information shouldn't be lost when it's removed from the complex, before the creation of a new facet)
  • can gain a little bit with writing a compact_mesh_vertex_3: there is a for example a Boolean in the TDS vertex base
  • Reduce the size of Point_3*? In sequential it's straightforward (e.g. quietNaN), but concurrent? But it's only stored for cells in complex, so is it worth it (3 doubles always vs 1 always and 1+3 often)
  • MISC: Can have memory leaks in parallel if multiple new circumcenters at the same time?

TODO:

The point is that in cell bases, we store facet info at great memory
cost given that only a small fraction of the facets are surface (i.e.,
part of the complex / restricted) facets.
WIP: available with both cell member API and map API
- Get rid of the caches: squat the value -2
- Re-order class member to use as few bytes as possible
I need access to the C3T3 member functions.

This could be restricted to surface facet criteria only,
but might as well do it for everything.
- Do not use a base_base
- Avoid the sliver cache: all values are positive, so squat -2
  as a cache.
- Do not use surface info arrays, use the C3T3 maps
- Re-order for byte padding
@MaelRL
MaelRL force-pushed the Mesh_3-memory-culling-GF branch from 7532b99 to 38626ba Compare February 18, 2026 12:15
@MaelRL
MaelRL force-pushed the Mesh_3-memory-culling-GF branch from 1bd040f to b5357bf Compare February 18, 2026 16:39
Comment thread SMDS_3/include/CGAL/Mesh_complex_3_in_triangulation_3.h Outdated
Comment thread SMDS_3/include/CGAL/Mesh_complex_3_in_triangulation_3.h Outdated
Comment thread SMDS_3/include/CGAL/SMDS_3/tet_soup_to_c3t3.h
@MaelRL MaelRL modified the milestones: 6.3-beta, 6.4-beta Oct 7, 2026
@lrineau lrineau removed Not yet approved The feature or pull-request has not yet been approved. TODO CHANGES.md not updated labels Oct 9, 2026
@lrineau

lrineau commented Oct 9, 2026

Copy link
Copy Markdown
Member

/build:doc

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

The documentation is built. It will be available, after a few minutes, here: https://cgal.github.io/9331/doc/Manual/index.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants