SlideShare ist ein Scribd-Unternehmen logo
1 von 32
Peter Muessig, SAP SE
June 30, 2017
UI5 Components
More Performance…
DISCLAIMER: No guarantees about future features! The whole topic is work in progress and anything might change at any time!
2
Making applications performant is unfortunately still a manual step. Due to compatibility reasons
UI5 cannot change the defaults of applications to ensure a performant bootstrap and runtime.
The session is inspired by the performance guide in the demokit and Frederic Bergs’ blogs. In
addition, it provides some more of the latest noteworthy features around Components.
References
 https://sapui5.hana.ondemand.com/#docs/guide/408b40efed3c416681e1bd8cdd8910d4.html
 https://blogs.sap.com/2016/10/29/sapui5-application-startup-performance-best-practices/
 https://blogs.sap.com/2016/11/19/sapui5-application-startup-performance-advanced-topics/
Overview
3
• Subscribe for a hanatrial account for usage of SAP Web IDE: https://hanatrial.ondemand.com or
use your existing account for SAP Web IDE
• Initial project can be found on GitHub and should be synced into SAP Web IDE workspace:
https://github.com/petermuessig/ui5con17-components-performance
• In addition to the initial project a destination for the Northwind service has to be created. Details
for that are explained in one of the next slides
Prerequisites
4
 Project structure:
– index.html: The HTML page to run the UI5 application
– manifest.json: The descriptor for applications contains the application metadata
incl. the libraries, dependencies, models for UI5 applications
– Component.js: The component controller which provides the runtime metadata
and the component methods.
– controller: Javascript files with the controller implementations for the
corresponding views
– css: Application specific CSS files (if required)
– i18n: Contains the properties files which contain the application’s resource files
in their respective translation
– model: Application specific models and their respective modules for
implementation
– view: Typically XML files for all view definitions
Getting Started: New UI5 Application created in Web IDE on hanatrial
5
 Edit index.html:
– Remove the <link> to style.css
 Edit manifest.json:
– Remove all library dependencies besides sap.ui.core and sap.m
Preparation step #1: Manual adoption of UI5 Application
6
 SAP Cloud Cockpit: https://account.hanatrial.ondemand.com/cockpit
– Create new destination:
▫ Name: northwind
▫ URL: http://services.odata.org/V2/OData/OData.svc/
▫ Proxy Type: Internet
▫ Authentication: NoAuthentication
▫ Additional Properties:
 WebIDEEnabled: true
 WebIDEUsage: odata_gen
Preparation step #2: Setup destination to Northwind
7
 Edit neo-app.json:
– Insert a new route which uses the northwind destination
Preparation step #3: Make Northwind service available
8
 Edit manifest.json:
– Use the northwind destination for the default ODataModel
Preparation step #4: Use Northwind service as default model
9
 Edit Main.view.xml:
– Insert a sap.m.Table control to display the Products of the Northwind service
Preparation step #5: Use Northwind service for sap.m.Table
10
 Application is a simple sap.m.Table displaying the products from
Nothwind service (w/o special adoptions)
 Run the application via Web IDE preview but remove the URL
parameter sap-ui-appCacheBuster for performance analysis
 Results of examination of network trace:
– Outgoing requests are synchronous
– UI5 is loaded from the same origin
– Application resources are loaded
individually (no preload is used!)
– 404 requests for i18n files
– OData metadata request is sync and
delays XML view processing
Initial Situation: Application + Performance
Bootstrap Performance
12
 Set the bootstrap configuration option
“sap-ui-preload” to value “async”
 Background information:
– UI5 bootstrap mechanism changes to behave
asynchronously. This affects all resources,
libraries and modules being required and
specified for bootstrap.
– Usage of Core#attachInit required to get informed
once the Core is fully intialized
Takeaway #1: Async Preloading of Libraries
13
 Load the bootstrap script from UI5 Akamai-enabled
CDN
– Available versions:
https://sapui5.hana.ondemand.com/versionoverview.html
 Background information:
– Most often resources on Edge servers are closer
than SAP data centers
– Benefit from resources being cached
– Server with language fallback logic (no 404 for
i18n resources from CDN server)
Takeaway #2: Use Akamai to reduce latency
14
 Set the concrete language to e.g. “en”
 Create “en” variant of i18n.properties file
 Background information:
– UI5 determines the browser language and
requests the concrete i18n files from the backend
and in case of 404s a more general request take
place
Takeaway #3: Avoid 404s; e.g. language fallbacks
15
 Remove library preload on bootstrap
 Load the Component via the Component factory in
the asynchronous way
 Background information:
– Unblock the main thread while loading the
Component dependencies and resources
– Usage of sap.ui.require (TODO!!!)
Takeaway #4: Load components asynchronously
16
 Load the manifest.json of the Component first to
analyze and preload the dependencies during
Component load
 Background information:
– Uses the information from the manifest.json to
load dependencies, includes resources during the
component load
– Attention: property will be deprecated with 1.50
and another property “manifest” should be used
Takeaway #5: Use “ManiFirst” to load the component
17
 Initial Situation
– 28 requests / 2,47 secs
 #1: Async Preloading of Libraries
– 28 requests / 1,83 secs
 #2: Use Akamai to reduce latency
– 26 requests / 1,91 secs
 #3: Avoid 404s; e.g. language fallbacks
– 22 requests / 1,47 secs
 #4: Load components asynchronously
– 20 requests / 1,53 secs
 #5: Use “ManiFirst” to load the component
– 21 requests / 1,5 secs
 BUT: Bootstrap Performance tweaks are not relevant when running Component inside LauchPad
Summary: Bootstrap Performance
Component Performance
19
 Use ODataModel V2 for databinding with an
OData service
 Background information:
– ODataModel V2 loads resources
asynchronously and doesn’t block the UI
thread
– By default uses $batch operation to fetch
multiple requests at once
– For Northwind service the XSRF token
handling should be deactivated which is not
supported for that service
Takeaway #1: Usage of ODataModel V2
20
 Preload models are created when load the
Component modules and creating the
Component instance
 Background information:
– Components can preload models which
modules are already loaded otherwise a
warning will be shown
– Especially the ODataModel V2 benefits
because the metadata can be loaded in
parallel during Component load
– No benefit for local models since it will omit the
content from Component preload!
Takeaway #2: Use model preload feature
21
 Generate a component preload to minimize
roundtrips by enabling the project type “SAPUI5
Client Build”
 Background info:
– Reduces the amount of round trips for a
component
– Required for asynchronous preload
– Web IDE packaging of today only combines JS
and View files but skips the manifest.json and the
properties
Takeaway #3, #4: Optimize application resources (Web IDE)
22
 Initial Situation
– 28 requests / 2,47 secs
 Bootstrap Performance
– 21 requests / 1,5 secs
 #1: Usage of ODataModel V2
– 20 requests / 1,2 secs
 #2: Use model preload feature
– 20 requests / 1,29 secs
 #3: Optimize application resources
– 17 requests / 1,23 secs
 #4: Optimize application resources (Magic)
– 16 requests / 0,8 secs
Summary: Component Performance
Conclusion
24
 Avoid sync requests
 Unblock UI thread
 Use idle times
 Reduce roundtrips
 Avoid 404s
Conclusion
Noteworthy
26
 Introduced ComponentLifecycle to control the destruction
time of the Component
 ComponentLifecycle:
– Legacy: ComponentContainer takes care to destroy
the Component which is associated with the
ComponentContainer once the ComponentContainer is
destroyed but not when a new Component is
associated
– Application: Application takes care to destroy the
Components associated with the ComponentContainer
– Container: ComponentContainer takes care to destroy
the Components associated with the
ComponentContainer once the ComponentContainer is
destroyed or a new Component is associated
ComponentContainer: Component Lifecycle
27
 The property “async” of the ComponentContainer has
been introduced to allow the asynchronous creation of the
Component by the Container
 Property defaults to “false” to be compatible
 Callback (thenable) missing once the Component is
created; will be added most probably with 1.50
ComponentContainer: Async Component Loading
28
 The property “autoPrefixId” of the ComponentContainer
has been introduced to enable the prefixing of the
Component ID with the ComponentContainer ID
 Necessary when reusing a View multiple times or for
databinding scenarios with the ComponentContainer
ComponentContainer: AutoPrefixId
29
 Explicit declaration of used components
– Every reuse component being used inside another
component must be declared!
 New section sap.ui5/componentUsages
– Reuse components are declared via their name incl.
default settings and componentData
– Dependency to reuse component is still needed
Component: Component Usage
30
 The property “manifest” harmonizes the properties
“manifestFirst”, “manifestUrl” and provides the
option to pass a object to the Component factory
 Get rid of confusions!
 manifest=true: loads the default manifest.json
 manifest=url: loads the manifest.json from the
specified url
 manifest=object: uses the provided manifest for the
Component
Component: Harmonized manifest property
31
 Code-free declaration of Components in
index.html page
 Multiple components can be declared via
separate tag with custom attributes in
HTML page
Idea: Declaration of Component on index.html
Thank you.
Contact information:
Peter Muessig
@pmuessig
You are welcome to give feedback for this session
in the UI5con Event App
DISCLAIMER: No guarantees about future features! The whole topic is work in progress and anything might change at any time!

Weitere ähnliche Inhalte

Was ist angesagt?

Arte Califal: la mezquita de Córdoba
Arte Califal: la mezquita de CórdobaArte Califal: la mezquita de Córdoba
Arte Califal: la mezquita de Córdobaneni
 
Arquitectura gótica francesa.
Arquitectura gótica francesa.Arquitectura gótica francesa.
Arquitectura gótica francesa.Alfredo García
 
Catedral de San Pedro Apóstol Cali
Catedral de San Pedro Apóstol CaliCatedral de San Pedro Apóstol Cali
Catedral de San Pedro Apóstol CaliAngela Ñañez
 
Arquitectura gótica religiosa
Arquitectura gótica religiosaArquitectura gótica religiosa
Arquitectura gótica religiosaLuis Cua
 

Was ist angesagt? (7)

Arte Califal: la mezquita de Córdoba
Arte Califal: la mezquita de CórdobaArte Califal: la mezquita de Córdoba
Arte Califal: la mezquita de Córdoba
 
La abadia de cluny
La abadia de clunyLa abadia de cluny
La abadia de cluny
 
Arquitectura gótica francesa.
Arquitectura gótica francesa.Arquitectura gótica francesa.
Arquitectura gótica francesa.
 
Catedral de San Pedro Apóstol Cali
Catedral de San Pedro Apóstol CaliCatedral de San Pedro Apóstol Cali
Catedral de San Pedro Apóstol Cali
 
Arte Gótico
Arte GóticoArte Gótico
Arte Gótico
 
Fontana di trevi
Fontana di treviFontana di trevi
Fontana di trevi
 
Arquitectura gótica religiosa
Arquitectura gótica religiosaArquitectura gótica religiosa
Arquitectura gótica religiosa
 

Ähnlich wie UI5con 2017 - UI5 Components - More Performance...

Integrate any Angular Project into WebSphere Portal
Integrate any Angular Project into WebSphere PortalIntegrate any Angular Project into WebSphere Portal
Integrate any Angular Project into WebSphere PortalHimanshu Mendiratta
 
Spring_Boot_Microservices-5_Day_Session.pptx
Spring_Boot_Microservices-5_Day_Session.pptxSpring_Boot_Microservices-5_Day_Session.pptx
Spring_Boot_Microservices-5_Day_Session.pptxPrabhakaran Ravichandran
 
Vue micro frontend implementation patterns
Vue micro frontend implementation patternsVue micro frontend implementation patterns
Vue micro frontend implementation patternsAlbert Brand
 
OpenShift/Kubernetes to Splunk log integration
OpenShift/Kubernetes to Splunk log integrationOpenShift/Kubernetes to Splunk log integration
OpenShift/Kubernetes to Splunk log integrationMichiel Kalkman
 
Establish reliable builds and deployments with Magento
Establish reliable builds and deployments with MagentoEstablish reliable builds and deployments with Magento
Establish reliable builds and deployments with MagentoUnic
 
Z sap boe-2016-techws-04_vs_fiori-app-with-eclipseluna-accessing-zsap-system
Z sap boe-2016-techws-04_vs_fiori-app-with-eclipseluna-accessing-zsap-systemZ sap boe-2016-techws-04_vs_fiori-app-with-eclipseluna-accessing-zsap-system
Z sap boe-2016-techws-04_vs_fiori-app-with-eclipseluna-accessing-zsap-systemNagendra Babu
 
Twelve-Factor application pattern with Spring Framework
Twelve-Factor application pattern with Spring FrameworkTwelve-Factor application pattern with Spring Framework
Twelve-Factor application pattern with Spring Frameworkdinkar thakur
 
Web componenet using angular element
Web componenet using angular elementWeb componenet using angular element
Web componenet using angular elementHimanshu Tamrakar
 
Java microservicesspringbootcasestudy2
Java microservicesspringbootcasestudy2Java microservicesspringbootcasestudy2
Java microservicesspringbootcasestudy2Subramanyam Vemala
 
Application Developmet lecture for backend
Application Developmet lecture for backendApplication Developmet lecture for backend
Application Developmet lecture for backendSobicaNoor
 
Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...
Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...
Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...Lucas Jellema
 
03 integrate webapisignalr
03 integrate webapisignalr03 integrate webapisignalr
03 integrate webapisignalrErhwen Kuo
 

Ähnlich wie UI5con 2017 - UI5 Components - More Performance... (20)

Integrate any Angular Project into WebSphere Portal
Integrate any Angular Project into WebSphere PortalIntegrate any Angular Project into WebSphere Portal
Integrate any Angular Project into WebSphere Portal
 
Open sap ui5 - week_2 unit_1_syjewa_exercises
Open sap ui5  - week_2 unit_1_syjewa_exercisesOpen sap ui5  - week_2 unit_1_syjewa_exercises
Open sap ui5 - week_2 unit_1_syjewa_exercises
 
Spring_Boot_Microservices-5_Day_Session.pptx
Spring_Boot_Microservices-5_Day_Session.pptxSpring_Boot_Microservices-5_Day_Session.pptx
Spring_Boot_Microservices-5_Day_Session.pptx
 
Asp.net control
Asp.net controlAsp.net control
Asp.net control
 
News web application
News web applicationNews web application
News web application
 
Vue micro frontend implementation patterns
Vue micro frontend implementation patternsVue micro frontend implementation patterns
Vue micro frontend implementation patterns
 
OpenShift/Kubernetes to Splunk log integration
OpenShift/Kubernetes to Splunk log integrationOpenShift/Kubernetes to Splunk log integration
OpenShift/Kubernetes to Splunk log integration
 
Establish reliable builds and deployments with Magento
Establish reliable builds and deployments with MagentoEstablish reliable builds and deployments with Magento
Establish reliable builds and deployments with Magento
 
Booting up with polymer
Booting up with polymerBooting up with polymer
Booting up with polymer
 
Sst hackathon express
Sst hackathon expressSst hackathon express
Sst hackathon express
 
Z sap boe-2016-techws-04_vs_fiori-app-with-eclipseluna-accessing-zsap-system
Z sap boe-2016-techws-04_vs_fiori-app-with-eclipseluna-accessing-zsap-systemZ sap boe-2016-techws-04_vs_fiori-app-with-eclipseluna-accessing-zsap-system
Z sap boe-2016-techws-04_vs_fiori-app-with-eclipseluna-accessing-zsap-system
 
Twelve-Factor application pattern with Spring Framework
Twelve-Factor application pattern with Spring FrameworkTwelve-Factor application pattern with Spring Framework
Twelve-Factor application pattern with Spring Framework
 
Web componenet using angular element
Web componenet using angular elementWeb componenet using angular element
Web componenet using angular element
 
GWT and PWA
GWT and PWAGWT and PWA
GWT and PWA
 
Java microservicesspringbootcasestudy2
Java microservicesspringbootcasestudy2Java microservicesspringbootcasestudy2
Java microservicesspringbootcasestudy2
 
Application Developmet lecture for backend
Application Developmet lecture for backendApplication Developmet lecture for backend
Application Developmet lecture for backend
 
Web Components and PWA
Web Components and PWAWeb Components and PWA
Web Components and PWA
 
Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...
Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...
Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...
 
03 integrate webapisignalr
03 integrate webapisignalr03 integrate webapisignalr
03 integrate webapisignalr
 
Ready! Steady! SpringBoot!
Ready! Steady! SpringBoot! Ready! Steady! SpringBoot!
Ready! Steady! SpringBoot!
 

Mehr von Peter Muessig

UI5con 2023 - Keynote
UI5con 2023 - KeynoteUI5con 2023 - Keynote
UI5con 2023 - KeynotePeter Muessig
 
UI5con 2021 - Keynote
UI5con 2021 - KeynoteUI5con 2021 - Keynote
UI5con 2021 - KeynotePeter Muessig
 
UI5con 2022 - Keynote
UI5con 2022 - KeynoteUI5con 2022 - Keynote
UI5con 2022 - KeynotePeter Muessig
 
UI5 Tooling & Ecosystem
UI5 Tooling & EcosystemUI5 Tooling & Ecosystem
UI5 Tooling & EcosystemPeter Muessig
 
UI5conBE 2020 - Keynote
UI5conBE 2020 - KeynoteUI5conBE 2020 - Keynote
UI5conBE 2020 - KeynotePeter Muessig
 
UI5 Tooling - Open and Extensible
UI5 Tooling - Open and ExtensibleUI5 Tooling - Open and Extensible
UI5 Tooling - Open and ExtensiblePeter Muessig
 
UI5con 2019 - Keynote for Bangalore
UI5con 2019 - Keynote for BangaloreUI5con 2019 - Keynote for Bangalore
UI5con 2019 - Keynote for BangalorePeter Muessig
 
UI5con 2019 - Keynote for Rot
UI5con 2019 - Keynote for RotUI5con 2019 - Keynote for Rot
UI5con 2019 - Keynote for RotPeter Muessig
 
UI5 Overview for ROOT
UI5 Overview for ROOTUI5 Overview for ROOT
UI5 Overview for ROOTPeter Muessig
 
UI5 Evolution Overview 2018
UI5 Evolution Overview 2018UI5 Evolution Overview 2018
UI5 Evolution Overview 2018Peter Muessig
 
UI5con 2018 - Keynote
UI5con 2018 - KeynoteUI5con 2018 - Keynote
UI5con 2018 - KeynotePeter Muessig
 
UI5con 2017 - UI5 Evolution
UI5con 2017 - UI5 EvolutionUI5con 2017 - UI5 Evolution
UI5con 2017 - UI5 EvolutionPeter Muessig
 
SAPUI5/OpenUI5 - Continuous Integration
SAPUI5/OpenUI5 - Continuous IntegrationSAPUI5/OpenUI5 - Continuous Integration
SAPUI5/OpenUI5 - Continuous IntegrationPeter Muessig
 

Mehr von Peter Muessig (13)

UI5con 2023 - Keynote
UI5con 2023 - KeynoteUI5con 2023 - Keynote
UI5con 2023 - Keynote
 
UI5con 2021 - Keynote
UI5con 2021 - KeynoteUI5con 2021 - Keynote
UI5con 2021 - Keynote
 
UI5con 2022 - Keynote
UI5con 2022 - KeynoteUI5con 2022 - Keynote
UI5con 2022 - Keynote
 
UI5 Tooling & Ecosystem
UI5 Tooling & EcosystemUI5 Tooling & Ecosystem
UI5 Tooling & Ecosystem
 
UI5conBE 2020 - Keynote
UI5conBE 2020 - KeynoteUI5conBE 2020 - Keynote
UI5conBE 2020 - Keynote
 
UI5 Tooling - Open and Extensible
UI5 Tooling - Open and ExtensibleUI5 Tooling - Open and Extensible
UI5 Tooling - Open and Extensible
 
UI5con 2019 - Keynote for Bangalore
UI5con 2019 - Keynote for BangaloreUI5con 2019 - Keynote for Bangalore
UI5con 2019 - Keynote for Bangalore
 
UI5con 2019 - Keynote for Rot
UI5con 2019 - Keynote for RotUI5con 2019 - Keynote for Rot
UI5con 2019 - Keynote for Rot
 
UI5 Overview for ROOT
UI5 Overview for ROOTUI5 Overview for ROOT
UI5 Overview for ROOT
 
UI5 Evolution Overview 2018
UI5 Evolution Overview 2018UI5 Evolution Overview 2018
UI5 Evolution Overview 2018
 
UI5con 2018 - Keynote
UI5con 2018 - KeynoteUI5con 2018 - Keynote
UI5con 2018 - Keynote
 
UI5con 2017 - UI5 Evolution
UI5con 2017 - UI5 EvolutionUI5con 2017 - UI5 Evolution
UI5con 2017 - UI5 Evolution
 
SAPUI5/OpenUI5 - Continuous Integration
SAPUI5/OpenUI5 - Continuous IntegrationSAPUI5/OpenUI5 - Continuous Integration
SAPUI5/OpenUI5 - Continuous Integration
 

Kürzlich hochgeladen

WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2
 
tonesoftg
tonesoftgtonesoftg
tonesoftglanshi9
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
WSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxalwaysnagaraju26
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxAnnaArtyushina1
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Bert Jan Schrijver
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...WSO2
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2
 

Kürzlich hochgeladen (20)

WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
WSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AI
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 

UI5con 2017 - UI5 Components - More Performance...

  • 1. Peter Muessig, SAP SE June 30, 2017 UI5 Components More Performance… DISCLAIMER: No guarantees about future features! The whole topic is work in progress and anything might change at any time!
  • 2. 2 Making applications performant is unfortunately still a manual step. Due to compatibility reasons UI5 cannot change the defaults of applications to ensure a performant bootstrap and runtime. The session is inspired by the performance guide in the demokit and Frederic Bergs’ blogs. In addition, it provides some more of the latest noteworthy features around Components. References  https://sapui5.hana.ondemand.com/#docs/guide/408b40efed3c416681e1bd8cdd8910d4.html  https://blogs.sap.com/2016/10/29/sapui5-application-startup-performance-best-practices/  https://blogs.sap.com/2016/11/19/sapui5-application-startup-performance-advanced-topics/ Overview
  • 3. 3 • Subscribe for a hanatrial account for usage of SAP Web IDE: https://hanatrial.ondemand.com or use your existing account for SAP Web IDE • Initial project can be found on GitHub and should be synced into SAP Web IDE workspace: https://github.com/petermuessig/ui5con17-components-performance • In addition to the initial project a destination for the Northwind service has to be created. Details for that are explained in one of the next slides Prerequisites
  • 4. 4  Project structure: – index.html: The HTML page to run the UI5 application – manifest.json: The descriptor for applications contains the application metadata incl. the libraries, dependencies, models for UI5 applications – Component.js: The component controller which provides the runtime metadata and the component methods. – controller: Javascript files with the controller implementations for the corresponding views – css: Application specific CSS files (if required) – i18n: Contains the properties files which contain the application’s resource files in their respective translation – model: Application specific models and their respective modules for implementation – view: Typically XML files for all view definitions Getting Started: New UI5 Application created in Web IDE on hanatrial
  • 5. 5  Edit index.html: – Remove the <link> to style.css  Edit manifest.json: – Remove all library dependencies besides sap.ui.core and sap.m Preparation step #1: Manual adoption of UI5 Application
  • 6. 6  SAP Cloud Cockpit: https://account.hanatrial.ondemand.com/cockpit – Create new destination: ▫ Name: northwind ▫ URL: http://services.odata.org/V2/OData/OData.svc/ ▫ Proxy Type: Internet ▫ Authentication: NoAuthentication ▫ Additional Properties:  WebIDEEnabled: true  WebIDEUsage: odata_gen Preparation step #2: Setup destination to Northwind
  • 7. 7  Edit neo-app.json: – Insert a new route which uses the northwind destination Preparation step #3: Make Northwind service available
  • 8. 8  Edit manifest.json: – Use the northwind destination for the default ODataModel Preparation step #4: Use Northwind service as default model
  • 9. 9  Edit Main.view.xml: – Insert a sap.m.Table control to display the Products of the Northwind service Preparation step #5: Use Northwind service for sap.m.Table
  • 10. 10  Application is a simple sap.m.Table displaying the products from Nothwind service (w/o special adoptions)  Run the application via Web IDE preview but remove the URL parameter sap-ui-appCacheBuster for performance analysis  Results of examination of network trace: – Outgoing requests are synchronous – UI5 is loaded from the same origin – Application resources are loaded individually (no preload is used!) – 404 requests for i18n files – OData metadata request is sync and delays XML view processing Initial Situation: Application + Performance
  • 12. 12  Set the bootstrap configuration option “sap-ui-preload” to value “async”  Background information: – UI5 bootstrap mechanism changes to behave asynchronously. This affects all resources, libraries and modules being required and specified for bootstrap. – Usage of Core#attachInit required to get informed once the Core is fully intialized Takeaway #1: Async Preloading of Libraries
  • 13. 13  Load the bootstrap script from UI5 Akamai-enabled CDN – Available versions: https://sapui5.hana.ondemand.com/versionoverview.html  Background information: – Most often resources on Edge servers are closer than SAP data centers – Benefit from resources being cached – Server with language fallback logic (no 404 for i18n resources from CDN server) Takeaway #2: Use Akamai to reduce latency
  • 14. 14  Set the concrete language to e.g. “en”  Create “en” variant of i18n.properties file  Background information: – UI5 determines the browser language and requests the concrete i18n files from the backend and in case of 404s a more general request take place Takeaway #3: Avoid 404s; e.g. language fallbacks
  • 15. 15  Remove library preload on bootstrap  Load the Component via the Component factory in the asynchronous way  Background information: – Unblock the main thread while loading the Component dependencies and resources – Usage of sap.ui.require (TODO!!!) Takeaway #4: Load components asynchronously
  • 16. 16  Load the manifest.json of the Component first to analyze and preload the dependencies during Component load  Background information: – Uses the information from the manifest.json to load dependencies, includes resources during the component load – Attention: property will be deprecated with 1.50 and another property “manifest” should be used Takeaway #5: Use “ManiFirst” to load the component
  • 17. 17  Initial Situation – 28 requests / 2,47 secs  #1: Async Preloading of Libraries – 28 requests / 1,83 secs  #2: Use Akamai to reduce latency – 26 requests / 1,91 secs  #3: Avoid 404s; e.g. language fallbacks – 22 requests / 1,47 secs  #4: Load components asynchronously – 20 requests / 1,53 secs  #5: Use “ManiFirst” to load the component – 21 requests / 1,5 secs  BUT: Bootstrap Performance tweaks are not relevant when running Component inside LauchPad Summary: Bootstrap Performance
  • 19. 19  Use ODataModel V2 for databinding with an OData service  Background information: – ODataModel V2 loads resources asynchronously and doesn’t block the UI thread – By default uses $batch operation to fetch multiple requests at once – For Northwind service the XSRF token handling should be deactivated which is not supported for that service Takeaway #1: Usage of ODataModel V2
  • 20. 20  Preload models are created when load the Component modules and creating the Component instance  Background information: – Components can preload models which modules are already loaded otherwise a warning will be shown – Especially the ODataModel V2 benefits because the metadata can be loaded in parallel during Component load – No benefit for local models since it will omit the content from Component preload! Takeaway #2: Use model preload feature
  • 21. 21  Generate a component preload to minimize roundtrips by enabling the project type “SAPUI5 Client Build”  Background info: – Reduces the amount of round trips for a component – Required for asynchronous preload – Web IDE packaging of today only combines JS and View files but skips the manifest.json and the properties Takeaway #3, #4: Optimize application resources (Web IDE)
  • 22. 22  Initial Situation – 28 requests / 2,47 secs  Bootstrap Performance – 21 requests / 1,5 secs  #1: Usage of ODataModel V2 – 20 requests / 1,2 secs  #2: Use model preload feature – 20 requests / 1,29 secs  #3: Optimize application resources – 17 requests / 1,23 secs  #4: Optimize application resources (Magic) – 16 requests / 0,8 secs Summary: Component Performance
  • 24. 24  Avoid sync requests  Unblock UI thread  Use idle times  Reduce roundtrips  Avoid 404s Conclusion
  • 26. 26  Introduced ComponentLifecycle to control the destruction time of the Component  ComponentLifecycle: – Legacy: ComponentContainer takes care to destroy the Component which is associated with the ComponentContainer once the ComponentContainer is destroyed but not when a new Component is associated – Application: Application takes care to destroy the Components associated with the ComponentContainer – Container: ComponentContainer takes care to destroy the Components associated with the ComponentContainer once the ComponentContainer is destroyed or a new Component is associated ComponentContainer: Component Lifecycle
  • 27. 27  The property “async” of the ComponentContainer has been introduced to allow the asynchronous creation of the Component by the Container  Property defaults to “false” to be compatible  Callback (thenable) missing once the Component is created; will be added most probably with 1.50 ComponentContainer: Async Component Loading
  • 28. 28  The property “autoPrefixId” of the ComponentContainer has been introduced to enable the prefixing of the Component ID with the ComponentContainer ID  Necessary when reusing a View multiple times or for databinding scenarios with the ComponentContainer ComponentContainer: AutoPrefixId
  • 29. 29  Explicit declaration of used components – Every reuse component being used inside another component must be declared!  New section sap.ui5/componentUsages – Reuse components are declared via their name incl. default settings and componentData – Dependency to reuse component is still needed Component: Component Usage
  • 30. 30  The property “manifest” harmonizes the properties “manifestFirst”, “manifestUrl” and provides the option to pass a object to the Component factory  Get rid of confusions!  manifest=true: loads the default manifest.json  manifest=url: loads the manifest.json from the specified url  manifest=object: uses the provided manifest for the Component Component: Harmonized manifest property
  • 31. 31  Code-free declaration of Components in index.html page  Multiple components can be declared via separate tag with custom attributes in HTML page Idea: Declaration of Component on index.html
  • 32. Thank you. Contact information: Peter Muessig @pmuessig You are welcome to give feedback for this session in the UI5con Event App DISCLAIMER: No guarantees about future features! The whole topic is work in progress and anything might change at any time!

Hinweis der Redaktion

  1. Previous: 28 Requests; 1.0 MB transferred; Finish: 2.47 s; DOMContentLoaded: 2.33 s; Load: 2.41 s Current: 28 Requests; 1.0 MB transferred; Finish: 1.83 s; DOMContentLoaded: 0,31 s; Load: 1,80 s
  2. Previous: 28 Requests; 1.0 MB transferred; Finish: 1.83 s; DOMContentLoaded: 0,31 s; Load: 1,80 s Current: 26 Requests; 1.0 MB transferred; Finish: 1.91 s; DOMContentLoaded: 0,35 s; Load: 1,91 s
  3. Previous: 26 Requests; 1.0 MB transferred; Finish: 1.91 s; DOMContentLoaded: 0,35 s; Load: 1,91 s Current: 22 Requests; 1.0 MB transferred; Finish: 1.47 s; DOMContentLoaded: 0,27 s; Load: 1,45 s
  4. Previous: 22 Requests; 1.0 MB transferred; Finish: 1.47 s; DOMContentLoaded: 0,27 s; Load: 1,45 s Current: 20 Requests; 1.0 MB transferred; Finish: 1.53 s; DOMContentLoaded: 0,25 s; Load: 1,47 s
  5. Previous: 20 Requests; 1.0 MB transferred; Finish: 1.53 s; DOMContentLoaded: 0,25 s; Load: 1,47 s Current: 21 Requests; 1.0 MB transferred; Finish: 1.50 s; DOMContentLoaded: 0,2 s; Load: 1,34 s
  6. Initial: 28 Requests; 1.0 MB transferred; Finish: 2.47 s; DOMContentLoaded: 2.33 s; Load: 2.41 s Final: 21 Requests; 1.0 MB transferred; Finish: 1.50 s; DOMContentLoaded: 0,2 s; Load: 1,34 s Language => language is set by FLP but should be available in Component
  7. Previous: 21 Requests; 1.0 MB transferred; Finish: 1.50 s; DOMContentLoaded: 0,2 s; Load: 1,34 s Next: 20 Requests; 1.0 MB transferred; Finish: 1.40 s; DOMContentLoaded: 0,22 s; Load: 0,97 s
  8. Previous: 20 Requests; 1.0 MB transferred; Finish: 1.40 s; DOMContentLoaded: 0,22 s; Load: 0,97 s Next: 20 Requests; 1.0 MB transferred; Finish: 1.29 s; DOMContentLoaded: 0,2 s; Load: 1,03 s https://sapui5.hana.ondemand.com/#docs/guide/26ba6a5c1e5c417f8b21cce1411dba2c.html Only works with Component Load Async & ManifestFirst
  9. Previous: 20 Requests; 1.0 MB transferred; Finish: 1.29 s; DOMContentLoaded: 0,2 s; Load: 1,03 s Next: 17 Requests; 1.0 MB transferred; Finish: 1.23 s; DOMContentLoaded: 0,17 s; Load: 0,48 s Show how it looks when to include manifest.json and properties into preload package: sap.watt.uitools.sapui5clientbuild/service/builder/PreloadComponentCreator Magic: 16 Requests; 1.0 MB transferred; Finish: 0,8 s; DOMContentLoaded: 0,16 s; Load: 0,46 s
  10. ComponentContainer takes care to destroy the Components associated with the ComponentContainer once the ComponentContainer is destroyed or a new Component is associated