Slow component creation

The time taken to create components seems very long compared with the native controls.  I did expect them to take a little longer, but not as long as I am seeing.

Delphi Rio 10.3.2, Win10 Desktop application. UIPack Version is

Some timing tests I've done to try and isolate the issue show that on my development PC

TMSFNCTableView takes on average 183 ms to create. (This is a TableView from the palette with no changes).
TMSFNCPageControl, TMSFNCGrid and TMSFNCDateTimePicker take 30-40 ms.  These are also the components directly added from the palette and not modified at all.

I haven't checked all the components I use in my application, but many frames are taking over 2 seconds to create.  It makes the program seem very sluggish on start and the first time each of the frames is viewed. The timing tests show that the FNC components are taking a while to create.

Using BeginUpdate and EndUpdate on the table view when initializing did speed it up a bit.

Is there something I can do to speed up the creation of components ?



We haven't experienced slow loading times with FNC controls so far. We'll investigate if there is a bottleneck but please be aware that there is a lot going on internally. It creates a graphics layer to render the controls. the TTMSFNCTableView is a big component as internally it uses a treeview base for rendering. BeginUpdate & EndUpdate is used for bundling all updates if you are programmatically setting properties or adding items. There is not a lot that can be done to speed up the process unfortunately.

I tracked this down a bit further and it appears to be related to getting style information. In the program I am using for testing, the biggest bottleneck can be traced to FMX.Canvas.D2D.DoMapBitmap. It then goes to WinAPI.ActiveX.Succeeded and I can't trace any further.  it is curious that the time taken in GetBackgroundFillColor varies considerably, with average hit times ranging from 0.010843 ms (416 calls) to 0.600779 ms (415 calls) depending, I assume, on the component involved, as the report from the NQS LineTimer has multiple entries for the routine.
Maybe the delay is related to the settings for my VM.

I would definitely test on real hardware. VM tends to run slower especially on graphics.

Thank you, I will.

I am also replacing the TableView components with TreeViews as my use is trivial and I have almost worked out how to get a display I am happy with.  This is making a big difference as I had 3 tableviews on some frames.