gosling-lang/gos

De-dupe repeated fields in partial tracks

manzt opened this issue · 1 comments

manzt commented

It is easiest to reuse a gos.Track instance for subsequent partial track definitions. This is fine, but it does lead to larger JSON that could be avoided. Similar to Altair, we could look into consolidated duplicate data in a parent Track if users use gos.stack or gos.overlay methods:

ref:

https://github.com/altair-viz/altair/blob/8ff06cfbbfb470aba6798999c61128be398c4996/altair/vegalite/v4/api.py#L40

manzt commented

This would need to understand track "inheritance" and partial tracks in Gosling and could be quite complicated. I'm going to close for now, and we can revisit if spec size (generated from Gos) becomes an issue in practice.