Community
Participate
Working Groups
Performance measurements have shown that calling the AdapterManager consumes a considerable amount of time in Widget#getAdapter(). Since the AdapterManager is currently used only to manage lifecycle adapters, we suggest the following improvement: In Widget#getAdapter(), we could directly consult the LifeCycleAdapterFactory in order to find the corresponding LCA. Furthermore, this result could be buffered in the widget.
Created attachment 195949 [details] Patch This patch converts the LifeCycleAdapterFactory from an IAdapterFactory that was registered at the AdapterManager to a member of the RWTFactory. The implementation of Display#getAdapter() and Widget#getAdapter() was changed to consult the LifeCycleAdapterFactory if an ILifeCycleAdapter is requested. Despite that RWT itself registers no more adapter factories at the AdapterManager, AdapterManager#getAdapter() is still called as a last resort in getAdapter().
Created attachment 196083 [details] Patch #2 Same as patch #1, plus it introduces SharedInstanceBuffer from bug 345933 in LifeCycleAdapterFactory
Converted the LifeCycleAdapterFactory from an AdapterFactory that was registered at the AdapterManager to a member of the RWTFactory. The implementation of Display#getAdapter() and Widget#getAdapter() was changed to consult the LifeCycleAdapterFactory if an ILifeCycleAdapter is requested. Despite that RWT itself registers no more adapter factories at the AdapterManager, AdapterManager#getAdapter() is still called as a last resort in getAdapter().