CAD CAD Performance & Optimization 2 — Questions and Answers
Question 1: Which SAPUI5 rendering optimization technique avoids re-rendering an entire list when only one item changes?
- Full list re-bind on every model update
- Using growingThreshold with client-side model updates and key-based diffing (Correct answer)
- Disabling two-way binding
- Switching to XML-only templates
Correct answer: Using growingThreshold with client-side model updates and key-based diffing
Key-based list diffing combined with growingThreshold allows SAPUI5 to update only the changed item's DOM nodes rather than the entire list.
Question 2: What is the purpose of SAP HANA's partition pruning feature?
- Physically deletes old partitions
- Skips partitions that cannot contain relevant rows based on the query filter, reducing scan scope (Correct answer)
- Moves cold partitions to disk storage automatically
- Merges delta and main stores in partitioned tables
Correct answer: Skips partitions that cannot contain relevant rows based on the query filter, reducing scan scope
Partition pruning eliminates irrelevant partitions at query planning time, so HANA only scans partitions that can satisfy the filter predicate.
Question 3: In a CAD application using CAP (Cloud Application Programming Model), which caching annotation prevents repeated DB queries for static code-list entities?
- @readonly
- @cds.persistence.skip
- @cds.autoexpose (Correct answer)
- @cds.search
Correct answer: @cds.autoexpose
@cds.autoexpose with read-only code lists allows CAP to serve these entities directly from in-process cache without hitting the database each time.
Question 4: Which HTTP response header should a CAD developer configure to enable browser caching of static SAPUI5 resources?
- X-Frame-Options
- Cache-Control: max-age=31536000, immutable (Correct answer)
- Content-Security-Policy
- X-Content-Type-Options
Correct answer: Cache-Control: max-age=31536000, immutable
Cache-Control: max-age with immutable tells browsers to cache static assets for one year without revalidation, eliminating redundant HTTP requests.
Question 5: What is the benefit of enabling SAP HANA's 'Result Cache' for analytical Calculation Views?
- It stores query results in disk-based tables permanently
- It reuses cached query results for identical queries within a configurable time window, avoiding re-computation (Correct answer)
- It compresses data in the main store
- It replicates query results to a secondary HANA node
Correct answer: It reuses cached query results for identical queries within a configurable time window, avoiding re-computation
The HANA Result Cache stores the output of expensive Calculation View queries so identical subsequent queries return immediately from cache.
Question 6: When profiling a slow SAPUI5 application, which browser tool is most useful for identifying JavaScript execution bottlenecks?
- Network tab to review HTTP headers
- Performance tab flame chart to identify long-running JS tasks (Correct answer)
- Application tab to inspect cookies
- Security tab to review certificates
Correct answer: Performance tab flame chart to identify long-running JS tasks
The Performance tab's flame chart visualizes the call stack over time, making it easy to spot expensive JavaScript functions or long tasks.
Which SAPUI5 rendering optimization technique avoids re-rendering an entire list when only one item changes?