Proposed improvements for TLCLComponent.NewInstance
Original Reporter info from Mantis: BrunoK
-
Reporter name:
Original Reporter info from Mantis: BrunoK
- Reporter name:
Description:
In the present situation, WSRegisterClass is always called as the first action. This leads to much up class inheritance calls that tends slow creation of forms with many controls (Frames etc...). In WSLCLClasses 2 TStringList's are used and they are sorted by ClassName.
The proposed code does first seek and exploit the existence of registered widgets (or their parent) before calling WSRegisterClass if needed.
WSLCLClasses holds a single TFPList and classes are sorted in this list by the ClassType's pointers of the TLCLComponent descendants..
Additional information:
Attachments :
- Patch for LCLClasses and WSLCLClasses on trunk (LCLComponent.patch).
- ZIP of these 2 units that allows a better visualisation of the changes. (lcl.zip)
- Optional patches for control.inc, wincontrol.inc and buttons.inc that cut inheritance recursion quickly. (Registered.patch)
Mantis conversion info:
- Mantis ID: 37360
- OS: Win10 / Linux
- Build: Trunk
- Platform: Win10 + Manjaro
- Fixed in revision: r63619 (#efdce59d)
- Monitored by: » @martin_frb (Martin Friebe), » Cyrax (Cyrax), » @zeljan1 (Zeljan Rikalo)