Details
-
Type:
Task
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 2.4
-
Component/s: Development, User Experience (UX)
-
Security Level: Public (Public: Anyone can view)
-
Labels:None
-
Epic Link:
-
Rice Module:KRAD
-
Sprint:2.4.0-m3 KRAD UXI Sprint 3, 2.4.0-m3 KRAD UXI Sprint 4, 2.4.0-m4 KRAD UXI Sprint 2
-
KAI Review Status:Not Required
-
KTI Review Status:Not Required
-
Code Review Status:Not Required
-
Include in Release Notes?:Yes
Description
Do analysis and POC on following items:
1. Reuse nested component lists. Initial timings with this approach several weeks ago were very positive, but I kept having to back it out due to stability issues. The lifecycle is much more organized now – once the current refactoring effort is stable, reusing nested component lists in a controlled manner will be quite a bit easier to accomplish.
2. Incremental view indexing and cleaning. During the lifecycle, there are several full tree traversals taking place: one for each phase, one to index the entire view between phases, and another to clean the view at the end. There are also multiple smaller traversals within various lifecycle phases for different purposes – for example to search for data fields in a collection. Incremental indexing could minimize these traversals, and incremental cleaning could free resources immediately after the render phase.
3. Component prototype “recycling”. If we can set up a reliable mechanism to recycle component instances, particularly those consumed as prototypes during the lifecycle, then heap consumption and GC overhead can be significantly reduced. The technique appears to have worked well to reverse the overhead added during lifecycle phase/task refactoring, and could work on a larger scale if applied to components. Have a look at LifecycleTaskFactory and LifecyclePhaseFactory for the general idea.
Implemented CopyUtils and RecycleUtils to facilitate more efficient copy with copyProperties() and reuse of a recycling object factory pattern.
The clone-based copy is faster (roughly 10-20% in unit test and krad-sampleapp runs) than the original Copyable implementation, and does not require implementations to write a copyProperties() method. To enable this feature, set "rice.krad.copyable.useClone" to true. If this new copy implementation passes review and is proven stable, then it may be become the default to simplify component authoring while improving performance overall.
RecycleUtils provides a thread-local queue of objects that may be reused by later operations in the same thread. Objects that have been recycled are held by weak references to prevent heap consumption. When several objects are used then discarded in a short-term fashion, then recycling eliminates constructor and GC overhead since the same instances may be reused.
These two updates are being committed along with a larger updated on
KULRICE-10550.