perf: Tighten useless information from rendered structures
phorward opened this issue · 1 comments
phorward commented
Currently, a bone that is rendered looks like this:
"structure": {
...
"active": {
"descr": "Aktiv",
"type": "select",
"required": true,
"params": {},
"visible": true,
"readonly": false,
"unique": false,
"languages": null,
"emptyvalue": null,
"indexed": true,
"multiple": false,
"values": {
"0": "Nein",
"1": "Ja"
},
"sortindex": 8,
}
...
}
but it can also be defined as below, when assuming some defaults for the given attributes:
"structure": {
...
"active": {
"descr": "Aktiv",
"type": "select",
"required": true,
"indexed": true,
"values": {
"0": "Nein",
"1": "Ja"
},
"sortindex": 8,
}
...
}
This omits attributes like visible: true
or readonly: false
, as they need only be set when explicitly required, so a visible: false
-bone is attributes as so, same as a readonly: true
bone.
It tightens the amount of data being sent to the client without loosing any information. We should discuss about this.