ComponentWarmer
Pool for pre-computing and storing ComponentTrees. Can be used to pre-compute and store ComponentTrees before they are inserted in a RecyclerBinder. The RecyclerBinder will fetch the precomputed ComponentTree from the pool if it's available instead of computing a layout calculation when the item needs to be computed.
Constructors
Link copied to clipboard
Sets up a ComponentTreeHolderPreparerWithSizeImpl as the of this instance.
constructor()
Creates a ComponentWarmer instance which is not ready to prepare items yet.
Creates a ComponentWarmer for this RecyclerBinder.
Same as ComponentWarmer but uses the passed in Cache instance to manage the internal cache.
Creates a ComponentWarmer which will use the provided ComponentTreeHolderPreparer instance to create ComponentTreeHolder instances for preparing and caching items.
constructor(factory: ComponentWarmer.ComponentTreeHolderPreparer, @Nullable cache: ComponentWarmer.Cache)
Same as ComponentWarmer but uses the passed in Cache instance to manage the internal cache.
Types
Link copied to clipboard
interface CacheListener
Link copied to clipboard
interface ComponentTreeHolderPreparer
Link copied to clipboard
Link copied to clipboard
interface ComponentWarmerReadyListener
Functions
Link copied to clipboard
Cancels the prepare execution for the item with the given tag if it's currently running and it removes the item from the cache.
Link copied to clipboard
If it exists, it returns the cached ComponentTreeHolder for this tag and removes it from cache.
Link copied to clipboard
Synchronously prepare the ComponentTree for the given ComponentRenderInfo.
open fun prepare(tag: String, componentRenderInfo: ComponentRenderInfo, @Nullable size: Size, handler: RunnableHandler)
Synchronously post preparing the ComponentTree for the given ComponentRenderInfo to the handler.
Link copied to clipboard
Asynchronously prepare the ComponentTree for the given ComponentRenderInfo.
Link copied to clipboard
Link copied to clipboard