On 15-09-2022 19:43, Csepp wrote: > Could we store the offsets of references somewhere at build time? I now remember that idea, I forgot about that one. My answer: I don't see why not, maybe by adding a phase to %standard-phases (at the very end, to avoid it becoming invalid) that saves it in, say, OUTPUT/.graft-offsets? That would avoid grafting files that don't even have any references, where a copy-file (maybe using copy_file_range or such when available) would suffice. Fallbacks might be necessary (not every store item is constructed from a package), but it all sounds doable and efficient. Also the union could needs to be modified to ignore the .graft-offsets of the union'ed things. Greetings, Maxime.