Remove table copies from tree_sequence_t and add options to share tables
See original GitHub issueIt should now be possible to make a tree sequence based on a “borrowed” or “stolen” reference to a table_collection_t
. For a borrowed reference, we store a pointer to the supplied tables, and do not free these tables when the tree sequence object is destroyed. For a stolen reference, we store a pointer to the supplied table collection which we free when the tree sequence object is destroyed. These can be specified with (mutually exclusive) flags. The default behaviour should be the present case, where we take a copy of the argument table_collection_t.
This behaviour will be useful for simulations, where we really don’t need to have two copies of the same tables. However, we’ll need to be careful to ensure that the underlying tables don’t get modified. Possibly need to add some locks to the tables to ensure this.
See also tree_sequence_load
for current wasteful behaviour.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (7 by maintainers)
Let’s close this - I don’t think we want to make any more changes to the semantics post 1.0.
I think this would be very handy, especially for people working with large tables.