microsoft / igvm

MIT License
81 stars 17 forks source link

igvm: add simple merge function #50

Closed chris-oo closed 2 months ago

chris-oo commented 2 months ago

On large IGVM files with many headers, the merge function can take a significant amount of time when attempting to merge headers via compatibility mask. I wasn't able to think of any good way to perform this merge faster while maintaining stability of the headers.

Offer a merge_simple function that merely does the required fixups. This is significantly faster, and since serialization deduplicates file_data, the size increase of the final file isn't much larger due to variable headers individually being quite small.

In the future we could implement a linear time unstable_merge that attempts to merge equivalent headers via a hashmap.

43