From bab4617e6a2c0839fe1048ae07d8bac636523d16 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Sun, 23 Jun 2013 07:26:35 +0000
Subject: [PATCH] explain impact of non-continuous node/element tags

---
 doc/texinfo/gmsh.texi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/doc/texinfo/gmsh.texi b/doc/texinfo/gmsh.texi
index cf0099ad50..64cf3b4ce5 100644
--- a/doc/texinfo/gmsh.texi
+++ b/doc/texinfo/gmsh.texi
@@ -3249,6 +3249,16 @@ before the @code{$Elements} section. Currently only one @code{$Nodes}
 and one @code{$Elements} section are allowed per file. (This might/will
 change in the future.) 
 
+Important note about efficiency. Node and element tags can be "sparse",
+i.e., do not have to constitute a continuous list of indexes starting at
+1. However, using non-continuous tags will lead to performance
+degradation. For meshes, non-continuous indexing forces Gmsh to use a
+map instead of a vector to access nodes and elements. The performance
+hit is on speed. For post-processing datasets, which always use vectors
+to access data, the performance hit is on memory. A @code{NodeData} with
+two nodes, tagged 1 and 1000000, will allocate a (mostly empty) vector
+of 1000001 elements.
+
 Any section with an unrecognized header is simply ignored: you can thus
 add comments in a @file{.msh} file by putting them e.g. inside a
 @code{$Comments}/@code{$EndComments} section.
-- 
GitLab