Ways to Improve VCL Rendering Times - Delphi 236

  Рет қаралды 1,522

Alister Christie

Alister Christie

Күн бұрын

Пікірлер: 18
@MaximilianMusterma
@MaximilianMusterma 5 ай бұрын
Would be nice if you can check if there is any performance difference if you enable the new skia embedded Framework.
@codegearguru
@codegearguru 5 ай бұрын
Skia would help a fmx application - I'll give it a go at some point.
@Graham_Wideman
@Graham_Wideman 5 ай бұрын
Alister -- this demo runs spectacularly slowly compared to my experience with Delphi UIs, which triggers a suspicion that there's some excessive calculations going on. I see you have the buttons set to alClient, and I can't tell if the grid is set to adapt to size of contained controls... which could interact with each other. Regardless, it would clarify considerably if you would create a simple baseline case of just creating and showing 400 buttons that have a fixed height and width, position at constant Left and Top locations (as calculated by the create loop). You could do a similar test where your "redraw" button repositions and/or tesizes the buttons, again providing them with constant new positions/sizes. That would shed some light as to whether your current test case might be triggering some pathological recursive calculations or something else like recursive flood of events.
@galdariah
@galdariah 5 ай бұрын
"Just creating and showing 400 buttons that have a fixed height and width, position at constant Left and Top locations" The biggest VCL problem is when you must set the position (Top and Left) from another component.
@Graham_Wideman
@Graham_Wideman 5 ай бұрын
@@galdariah What do you mean by "set the position (Top and Left) from another component."
@galdariah
@galdariah 5 ай бұрын
​@@Graham_Wideman I made a mistake. In Delphi, to choose a position, we need to manually drag the component to adjust its position. For example, a TPanel with 5 TButtons aligned to alLeft. If you want to dynamically create these buttons, you have to create them in the corresponding order. LCL has a complex Anchor system, and that was my mistake.
@fburton8
@fburton8 5 ай бұрын
I agree, it seems terribly slow for this day and age. When I get time, I’ll try the same code on my legacy Delphi 7 system to see if that is any different. Edited to add: Using Delphi 7 on an HP Z2 Mini G4, I get ~1 second for a straight resize and ~0.5 seconds when I do the resizing with the visibility of the panel set to false. However, as TGridPanel isn't available in Delphi 7, I used a plain TPanel to trigger resizing and set the size and position of all the buttons inside the panel (and stored in an array) myself using SetBounds. This seemed more straightforward than messing with a TDrawGrid. Manually resizing the window still results in noticeably laggy UI performance though, so if I really wanted to get the effect of a 2D array of buttons in a snappy interface I would probably draw them myself.
@codegearguru
@codegearguru 4 ай бұрын
I think I'll need to re-try this laying out the buttons manually, rather than using the TGridPanel. It does seem to be slower than I would expect.
@schobihh2703
@schobihh2703 Ай бұрын
why not use beginupdate endupdate?
@fburton8
@fburton8 5 ай бұрын
I assume that BeginUpdate / EndUpdate isn’t applicable in this situation.
@galdariah
@galdariah 5 ай бұрын
I was expecting one last compilation with all these ways, lol. Embarcadero has much to improve on VLC speed, considering LCL is many times faster.
@JanDoggen
@JanDoggen 5 ай бұрын
Yes, a follow-up question is whether e.g. Visible := false in combination with SetBounds is better
@codegearguru
@codegearguru 4 ай бұрын
I'll probably do a follow up on this, probably using FMX and not using the TGridPanel with the VCL.
@codegearguru
@codegearguru 4 ай бұрын
Yes, it will likely be better as it reduces the number of times the components are re-rendered by half.
@freezer86
@freezer86 5 ай бұрын
Well.. it's not quite improving of rendering. BTW: You did not try to disable runtime themes (checkbox in Application->manifest) it's will "improve" unstyled version.
@codegearguru
@codegearguru 5 ай бұрын
It might be marginally faster, but didn't make a big difference.
Build Notepad.exe in Delphi - Delphi 231
34:29
Alister Christie
Рет қаралды 2,8 М.
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
Logging Using Dependency Inversion - Delphi 238
42:21
Alister Christie
Рет қаралды 1,3 М.
Reduce the Memory Required to Build Your Project - Delphi 229
16:03
Alister Christie
Рет қаралды 1,5 М.
Creating Resizable UIs in LabVIEW
12:11
Cannon Controls
Рет қаралды 529
Create Life From a Simple Rule
14:37
Brainxyz
Рет қаралды 790 М.
Chinese app design: weird, but it works. Here's why
10:51
Phoebe Yu
Рет қаралды 575 М.
It’s time to move on from Agile Software Development (It's not working)
11:07
1 A.M Study Session 📚 [lofi hip hop]
1:01:14
Lofi Girl
Рет қаралды 112 МЛН
Build a DataSnap Client and Server - Delphi 233
11:34
Alister Christie
Рет қаралды 1,8 М.
HTMX Sucks
25:16
Theo - t3․gg
Рет қаралды 130 М.
CPU Upgrade i3-2120 to i7-2600
11:33
Alister Christie
Рет қаралды 3,1 М.