‎2020 May 09 12:44 PM
Hi Experts,
Does arranging the same CDS Annotation in a hierarchy have an affect on the CDS in any way performance wise or otherwise?
e.g.
Way 1
@UI: {facet:[ { purpose: #STANDARD,
type: #IDENTIFICATION_REFERENCE,
label:'UI facet label',
position: 10} ],
lineItem:[ { position: 10,
label: 'UI Lineitem Label' } ],
selectionField: [ { position: 10 } ] }
way 2
@UI.facet.purpose: #STANDARD
@UI.facet.type: #IDENTIFICATION_REFERENCE
@UI.facet.label:'UI facet label'
@UI.facet.position: 10
@UI.lineItem.position: 10
@UI.lineItem.label: 'UI Lineitem Label'
@UI.selectionField.position: 10
Is it more of a aesthetic and code beauty point of view?
or does it have some performance related aspect.
I am new to this CDS.
‎2020 May 09 1:00 PM
Hi Siddharth,
There will be no performance issue on cds view, because these annotations are used only when u activate ur cds view and these will be saved to a DB table and while u generate the odata service, they will be used to create annotation service.
So surely writing them in different ways will not affect the performance.
But the first way is better as it is more readable especially in case if you have array of facet annotations.
-Mahesh
‎2020 May 09 1:00 PM
Hi Siddharth,
There will be no performance issue on cds view, because these annotations are used only when u activate ur cds view and these will be saved to a DB table and while u generate the odata service, they will be used to create annotation service.
So surely writing them in different ways will not affect the performance.
But the first way is better as it is more readable especially in case if you have array of facet annotations.
-Mahesh