Recent

Author Topic: How to speed up autosize?  (Read 3192 times)

stem

  • Jr. Member
  • **
  • Posts: 88
How to speed up autosize?
« on: February 04, 2020, 11:07:12 pm »
Hi,

I have applied many of the rules of https://wiki.lazarus.freepascal.org/Autosize_/_Layout. My application now looks great with different operating systems (Windows 10, Linux Mint Xfce), with different DPI values and adapts to translated po files.

My problem: I have a resizable form with a very complex layout. Resizing the form at runtime is noticeably slower than once when the rules were not applied, especially on Windows.

Is there a way to speed up the calculation of the LCL layout? Is it useful, for example, to set MinHeight and MinWidth (constraints) for each component?

Thank you!

stem

ps

  • Full Member
  • ***
  • Posts: 136
    • CSS
Re: How to speed up autosize?
« Reply #1 on: April 17, 2020, 11:18:28 pm »
You have too many (10+ lol...) TWinControl on form and trying resizing width or height ... It's really crazy in 2020. Internet browsers resize 10000+ controls with no lag because there is no WinControls (only one main form)  ... but resizing 10+ native WinControls lags ass hell ...

LCL layout engine is fast. You can resize 1000+ non TWinControls with it (eg. TShape, TLabel , ...etc. ).

Try to eliminate all TWinControl based controls ...   >:D >:D >:D
Small simple CSS/box model implementation: https://github.com/pst2d/csscontrols/tree/dev

 

TinyPortal © 2005-2018