On Tue, Oct 15, 2024 at 12:31:07PM +0100, Gavin Smith wrote: > On Mon, Oct 14, 2024 at 11:16:58PM +0200, Patrice Dumas wrote: > > This looks good to me, it is quite simple. Maybe the number of buckets > > could be set based on the number of sections + nodes + index entries? > > Great idea, I was concerned that I'd hardcoded the number of buckets.
Could add the number of footnotes * 2 and the number of special units (including special units not associated to a section/node). And sections number should be * 3 for contents and shortcontents targets. Also maybe the buckets memory should be allocated to that same number, (number of sections * 3 + number of headings + number of (nodes, anchors, floats) + number of index entries + number of footnotes * 2 + number of special units) as we know in advance there there will be this number of registered ids. -- Pat
