-
Content Count
652 -
Joined
-
Last visited
-
Days Won
43
Everything posted by Vincent Parrett
-
MAP2PDB - Profiling with VTune
Vincent Parrett replied to Anders Melander's topic in Delphi Third-Party
I recreated the dproj file and now it works.. gotta love the mess that is dproj files upgraded through multiple delphi versions 🙄 -
MAP2PDB - Profiling with VTune
Vincent Parrett replied to Anders Melander's topic in Delphi Third-Party
Weird since the file is definitely being compiled with debug info. I added this to test {$IFOPT D+} Well debug info is turned on so this should not compile {$ENDIF} and it hits the error. I'll investigate further. -
MAP2PDB - Profiling with VTune
Vincent Parrett replied to Anders Melander's topic in Delphi Third-Party
This is an odd one, the package is compiled with debug info etc, but I get this output : :\map2pdb>map2pdb.exe I:\FBAT_HG9\Output\FB9\VSoft.Core.DB.map -bind:I:\FBAT_HG9\Output\FB9\VSoft.Core.DB.bpl -v map2pdb - Copyright (c) 2021 Anders Melander Version 2.0 Constructed a new PDB GUID: {B1FCFCB0-3F09-4207-BB64-0D1D08101C3F} Output filename not specified. Defaulting to VSoft.Core.DB.pdb Reading MAP file - Segments Warning: [ 7] Empty segment: .tls [0005:00000000] Warning: [ 8] Empty segment: .pdata [0006:00400000] - Modules Warning: [ 791] Module exceed segment bounds - ignored: nxllConst [0005:00000000+4] Warning: [ 792] Module exceed segment bounds - ignored: nxllSync [0005:00000004+12] Warning: [ 793] Module exceed segment bounds - ignored: nxllUtils [0005:00000010+8] Warning: [ 794] Module exceed segment bounds - ignored: nxllException [0005:00000018+12] Warning: [ 795] Module exceed segment bounds - ignored: nxllPlatformInterface [0005:00000024+4] Warning: [ 796] Module exceed segment bounds - ignored: nxsdDataDictionary [0005:00000028+4] Warning: [ 797] Module exceed segment bounds - ignored: nxsdServerEngine [0005:0000002C+4] Warning: [ 798] Module exceed segment bounds - ignored: nxsrFileImplWin32 [0005:00000030+8] Warning: [ 799] Module exceed segment bounds - ignored: nxsrTimeoutHandling [0005:00000038+56] Warning: [ 800] Module exceed segment bounds - ignored: nxseHeapEngineCached [0005:00000070+4] Warning: [ 801] Module exceed segment bounds - ignored: nxsrServerEngine [0005:00000074+4] Warning: [ 802] Module exceed segment bounds - ignored: nxllTransport [0005:00000078+4] Warning: [ 803] Module exceed segment bounds - ignored: nxrbCallContext [0005:0000007C+4] Warning: [ 804] Module exceed segment bounds - ignored: nxptBasePooledTransport [0005:00000080+24] Warning: [ 805] Module exceed segment bounds - ignored: nxsqlTableExp [0005:00000098+4] Warning: [ 806] Module exceed segment bounds - ignored: nxsqlCondExp [0005:0000009C+4] Warning: [ 807] Module exceed segment bounds - ignored: nxsqlProxies [0005:000000A0+4] Warning: [ 808] Module exceed segment bounds - ignored: nxdb [0005:000000A4+4] Warning: [ 809] Module exceed segment bounds - ignored: nxllSocket [0005:000000A8+4] - Symbols Warning: [ 2213] Failed to resolve symbol to module: [0005:000000A4] nxdb._nxDefaultSession Warning: [ 3236] Failed to resolve symbol to module: [0005:00000000] nxllConst._CurrentThreadNxVersion Warning: [ 3391] Failed to resolve symbol to module: [0005:00000020] nxllException._CurrentExceptionHookInfo Warning: [ 3395] Failed to resolve symbol to module: [0005:00000018] nxllException._LastError Warning: [ 3396] Failed to resolve symbol to module: [0005:0000001C] nxllException._LastMessage Warning: [ 4052] Failed to resolve symbol to module: [0005:00000024] nxllPlatformInterface.nxIsUIThread Warning: [ 4216] Failed to resolve symbol to module: [0005:000000A8] nxllSocket.SocketErrorProc Warning: [ 4455] Failed to resolve symbol to module: [0005:00000008] nxllSync.nxtv_BreathCallback Warning: [ 4649] Failed to resolve symbol to module: [0005:00000078] nxllTransport.nxitvTransport Warning: [ 4990] Failed to resolve symbol to module: [0005:00000014] nxllUtils._ThreadCodePage Warning: [ 4991] Failed to resolve symbol to module: [0005:00000010] nxllUtils._ThreadLocale Warning: [ 5545] Failed to resolve symbol to module: [0005:00000080] nxptBasePooledTransport.nxitvReplyInfos Warning: [ 5732] Failed to resolve symbol to module: [0005:00000090] nxptBasePooledTransport._Interval Warning: [ 5733] Failed to resolve symbol to module: [0005:00000094] nxptBasePooledTransport._Mask Warning: [ 5734] Failed to resolve symbol to module: [0005:00000088] nxptBasePooledTransport._NetIdle Warning: [ 5757] Failed to resolve symbol to module: [0005:0000007C] nxrbCallContext._CurrentCallContext Warning: [ 7123] Failed to resolve symbol to module: [0005:00000028] nxsdDataDictionary._DontLoadID Warning: [ 9598] Failed to resolve symbol to module: [0005:0000002C] nxsdServerEngine._SessionStatsCurrent Warning: [10232] Failed to resolve symbol to module: [0005:00000070] nxseHeapEngineCached._FindBlockNumber Warning: [12890] Failed to resolve symbol to module: [0005:0000009C] nxsqlCondExp._CurrentlyProcessedContains Warning: [14747] Failed to resolve symbol to module: [0005:000000A0] nxsqlProxies.nxsqlNoProcessingCounter Warning: [16463] Failed to resolve symbol to module: [0005:00000098] nxsqlTableExp._LockUnbindIfRequired Warning: [17204] Failed to resolve symbol to module: [0005:00000030] nxsrFileImplWin32.FileBlocks Warning: [17207] Failed to resolve symbol to module: [0005:00000034] nxsrFileImplWin32.HighestBlock Warning: [18261] Failed to resolve symbol to module: [0005:00000074] nxsrServerEngine._ForRecover Warning: [18471] Failed to resolve symbol to module: [0005:00000038] nxsrTimeoutHandling.nxtv_TimeoutHandling Warning: [18617] Failed to resolve symbol to module: [0005:000000AC] SysInit.TlsLast Warning: [18621] Failed to resolve symbol to module: [0004:FFC91000] SysInit.__ImageBase - Line numbers Constructing PDB file - Collecting source file names - Module streams - Strings stream - PDB Info stream - TPI stream - Symbols stream - DBI stream - IPI stream - Finalizing PDB file Patching PE file - PE32 image (32-bit) Image does not contain a debug directory address - please link with debug info enabled bpl, map and pdb attached. VSoft_Core.DB.zip -
MAP2PDB - Profiling with VTune
Vincent Parrett replied to Anders Melander's topic in Delphi Third-Party
Agree, there is already a few issues asking for pdb support that have lots of votes and have been open for years. @Marco Cantu @David Millington FYI. -
MAP2PDB - Profiling with VTune
Vincent Parrett replied to Anders Melander's topic in Delphi Third-Party
Well that's what happens when you strip the team down to the bare bones and then hire short term contractors, maintaining things becomes a problem when your teams domain knowledge is low. FWIW, 5 minutes in and I already fixed a perf issue in the area that I have been trying to optimise for the last week (replaced a list with a hashset) - a small win but I'll take any win I can get right now😃 Pity embarcadero don't ship map files for their bpl's - hmmm will log a qc for that - because as I dig deeper into my perf issues I end up in the weeds in rtl etc with func@xxx a lot. -
MAP2PDB - Profiling with VTune
Vincent Parrett replied to Anders Melander's topic in Delphi Third-Party
It wasn't that, and I probably did forget the bind switch before I sent it to you, however with the new version.... we have lift off! Awesome work! E:\map2pdb>map2pdb.exe I:\FBAT_HG9\Output\FB9\FinalBuilder9.map -v -bind:I:\FBAT_HG9\Output\FB9\FinalBuilder9.exe map2pdb - Copyright (c) 2021 Anders Melander Version 2.0 Constructed a new PDB GUID: {CE1E6D08-67E6-4B5B-B42A-3FC719254F1E} Output filename not specified. Defaulting to FinalBuilder9.pdb Reading MAP file - Segments Warning: [ 8] Empty segment: .pdata [0006:00400000] - Modules - Symbols Warning: [20671] Failed to resolve symbol to module: [0005:00000608] SysInit.TlsLast Warning: [20673] Failed to resolve symbol to module: [0004:FF77A000] SysInit.__ImageBase - Line numbers Warning: [71563] Line number with zero offset ignored. Module:VSoft.IDE.Types, Segment:0001, Source:VSoft.IDE.Types.pas, Line:49 Warning: [71567] Line number with zero offset ignored. Module:VSoft.IDE.Interfaces, Segment:0001, Source:VSoft.IDE.Interfaces.pas, Line:328 Warning: [75481] Line number with zero offset ignored. Module:LMDRTLConst, Segment:0001, Source:LMDRTLConst.pas, Line:213 Warning: [75621] Line number with zero offset ignored. Module:intfLMDBase, Segment:0001, Source:intfLMDBase.pas, Line:44 Warning: [76980] Line number with zero offset ignored. Module:LMDDckCst, Segment:0001, Source:LMDDckCst.pas, Line:29 Warning: [79649] Line number with zero offset ignored. Module:VSoft.IDE.ActionListInterfaces, Segment:0001, Source:VSoft.IDE.ActionListInterfaces.pas, Line:136 Warning: [90056] Line number with zero offset ignored. Module:SynEditStrConst, Segment:0001, Source:SynEditStrConst.pas, Line:577 Warning: [98436] Line number with zero offset ignored. Module:VSoft.IDE.WizardManagerService, Segment:0001, Source:VSoft.IDE.WizardManagerService.pas, Line:61 Warning: [99799] Line number with zero offset ignored. Module:dwTaskbarList, Segment:0001, Source:dwTaskbarList.pas, Line:213 Warning: [103835] Line number with zero offset ignored. Module:RestException, Segment:0001, Source:RestException.pas, Line:26 Warning: [105461] Line number with zero offset ignored. Module:VSoft.Shared.UXLControlIntf, Segment:0001, Source:VSoft.Shared.UXLControlIntf.pas, Line:60 Warning: [107033] Line number with zero offset ignored. Module:VSoft.IDE.MS.ActionCollection.Interfaces, Segment:0001, Source:VSoft.IDE.MS.ActionCollection.Interfaces.pas, Line:1085 Constructing PDB file - Collecting source file names - Module streams - Strings stream - PDB Info stream - TPI stream - Symbols stream - DBI stream - IPI stream - Finalizing PDB file Patching PE file - PE32 image (32-bit) - PDB file name has been stored in debug data. - Header checksum has been cleared. - PE file has been updated. I was also able to create a pdb for the package E:\map2pdb>map2pdb.exe I:\FBAT_HG9\Output\FB9\VSoft.Core.map -bind:I:\FBAT_HG9\Output\FB9\VSoft.Core.bpl -v map2pdb - Copyright (c) 2021 Anders Melander Version 2.0 Constructed a new PDB GUID: {76323C0F-0787-44F8-BC72-2B6ACC9CBF82} Output filename not specified. Defaulting to VSoft.Core.pdb Reading MAP file - Segments Warning: [ 7] Empty segment: .tls [0005:00000000] Warning: [ 8] Empty segment: .pdata [0006:00400000] - Modules Warning: [ 1682] Module exceed segment bounds - ignored: OtlCommon.Utils [0005:00000000+256] - Symbols Warning: [ 6403] Failed to resolve symbol to module: [0005:00000000] OtlCommon.Utils.LastThreadName Warning: [ 8705] Failed to resolve symbol to module: [0005:00000100] SysInit.TlsLast Warning: [ 8709] Failed to resolve symbol to module: [0004:FFBF8000] SysInit.__ImageBase - Line numbers Warning: [64147] Line number offset out of range for module. Offset:003DAEEF, Module:.VSoft.Core [003DAEF0 - 003E5738] Constructing PDB file - Collecting source file names - Module streams - Strings stream - PDB Info stream - TPI stream - Symbols stream - DBI stream - IPI stream - Finalizing PDB file Patching PE file - PE32 image (32-bit) - PDB file name has been stored in debug data. - Header checksum has been cleared. - PE file has been updated. Now to hook it into every project in the group and see how it goes 😃 Thanks again for this awesome effort.. my only question now is, if you can do this in your spare time, why TF can't embarcadero do it 🙄 -
MAP2PDB - Profiling with VTune
Vincent Parrett replied to Anders Melander's topic in Delphi Third-Party
I compiled map2pdb from source using 10.4.2 and vtune now loads the pdb from the test project. Sadly it didn't work for my real application Cannot locate debugging information for file 'I:\FBAT_HG9\Output\FB9\FinalBuilder9.exe'. Cannot match the module with the symbol file 'I:\FBAT_HG9\Output\FB9\FinalBuilder9.pdb'. Make sure to specify the correct path to the symbol file in the Binary/Symbol Search list of directories. -
MAP2PDB - Profiling with VTune
Vincent Parrett replied to Anders Melander's topic in Delphi Third-Party
Well I tried the same project with 10.3 and got the same result, so it's not the compiler version. I'm using Vtune 2021.1.1 Gold - perhaps it's the vtune version? -
MAP2PDB - Profiling with VTune
Vincent Parrett replied to Anders Melander's topic in Delphi Third-Party
I suspect this has to do with the compiler version, using 10.4.2 even the test console app doesn't show function names. Project3.zip -
MAP2PDB - Profiling with VTune
Vincent Parrett replied to Anders Melander's topic in Delphi Third-Party
I have pm'd the map file, I didn't have your email address handy. -
MAP2PDB - Profiling with VTune
Vincent Parrett replied to Anders Melander's topic in Delphi Third-Party
I was seriously excited about this, until I realized I don't really know how to drive vtune 🙄 (terrible user interface!). So I was able to generate a pdb (9.5MB) and it appears to bind, however when running with vtune I don't see function names CPU Time 1 of 1: 100.0% (0.010s of 0.010s) FinalBuilder9.exe ! func@0x77c258 - [unknown source file] FinalBuilder9.exe ! func@0x4de4bf + 0xca - [unknown source file] FinalBuilder9.exe ! func@0x4ea8f8 + 0x176 - [unknown source file] FinalBuilder9.exe ! func@0x4ea518 + 0x10c - [unknown source file] FinalBuilder9.exe ! func@0x4ea8f8 + 0xf5 - [unknown source file] FinalBuilder9.exe ! func@0x4ea518 + 0x10c - [unknown source file] FinalBuilder9.exe ! func@0x4ea8f8 + 0xf5 - [unknown source file] FinalBuilder9.exe ! func@0x4ea518 + 0x10c - [unknown source file] FinalBuilder9.exe ! func@0x4ea8f8 + 0xf5 - [unknown source file] FinalBuilder9.exe ! func@0x4ea518 + 0x10c - [unknown source file] ..... How can I see if vtune is actually using the pdb? Also I'm using runtime packages, however when I tried to create a pdb for packages map2pdb crashed E:\map2pdb>map2pdb.exe I:\FBAT_HG9\Output\FB9\VSoft.Core.map -bind:I:\FBAT_HG9\Output\FB9\VSoft.Core.bpl -v map2pdb - Copyright (c) 2021 Anders Melander Version 2.0 Output filename not specified. Defaulting to VSoft.Core.pdb Reading MAP file - Segments - Modules An error occurred in the application. date/time : 2021-04-04, 08:53:18, 171ms computer name : SR22 user name : vincent registered owner : Vincent operating system : Windows 10 x64 build 19042 system language : English system up time : 42 minutes 16 seconds program up time : 185 milliseconds processors : 8x Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz physical memory : 52813/65477 MB (free/total) free disk space : (C:) 78.24 GB (E:) 233.56 GB display mode : 2560x1440, 32 bit process id : $55d0 allocated memory : 118.39 MB largest free block : 1.47 GB command line : map2pdb.exe I:\FBAT_HG9\Output\FB9\VSoft.Core.map -bind:I:\FBAT_HG9\Output\FB9\VSoft.Core.bpl -v executable : map2pdb.exe exec. date/time : 2021-04-04 08:00 compiled with : Delphi 10.3 Rio madExcept version : 5.1.0 callstack crc : $7846b8db, $f263fd00, $f263fd00 exception number : 1 exception class : EArgumentOutOfRangeException exception message : Argument out of range. thread $5a5c: 0046c541 +029 map2pdb.exe debug.info TDebugInfoSegments.FindByIndex 0047e90f +58b map2pdb.exe debug.info.reader.map TDebugInfoMapReader.LoadFromStream 0047d844 +034 map2pdb.exe debug.info.reader TDebugInfoReader.LoadFromFile 004aa13e +2e6 map2pdb.exe map2pdb 140 +62 initialization 76dffa27 +017 KERNEL32.DLL BaseThreadInitThunk thread $5c8: 76dffa27 +17 KERNEL32.DLL BaseThreadInitThunk thread $55d8: 76dffa27 +17 KERNEL32.DLL BaseThreadInitThunk thread $5b2c: 76dffa27 +17 KERNEL32.DLL BaseThreadInitThunk thread $4fac: 76dffa27 +17 KERNEL32.DLL BaseThreadInitThunk thread $5bc0: 76dffa27 +17 KERNEL32.DLL BaseThreadInitThunk -
Google Tests (unit testing framework) working with Embarcadero C++ clang compiler?
Vincent Parrett replied to Roger Cigol's topic in General Help
It's not that I don't care for it, I just don't have the time (or skills for it). Happy to look at contributions to achieve this. I do know there are some issues with constructor overloads that would need to be addressed.- 26 replies
-
- c++
- google tests
-
(and 1 more)
Tagged with:
-
Google Tests (unit testing framework) working with Embarcadero C++ clang compiler?
Vincent Parrett replied to Roger Cigol's topic in General Help
Ok, that's news to me (DUnitX author). 😉- 26 replies
-
- c++
- google tests
-
(and 1 more)
Tagged with:
-
VCL Handling of dpi changes - poor performance
Vincent Parrett replied to Vincent Parrett's topic in VCL
Yes, the project started in Delphi 5, been upgraded a few times over the years, so not sure when that property was set but it did take a while to figure out what was going on. -
VCL Handling of dpi changes - poor performance
Vincent Parrett replied to Vincent Parrett's topic in VCL
Just a word of warning about setting ParentFont := true - I had ParentFont := true on a base form class and this completely disabled scaling on all the descendant forms! This just took me an hour of messing around to reproduce in a test project. I have no idea why ParentFont was set on that form - the project is 20yrs old and I've changed version control several times over the years so couldn't find the commit where that was set. Not sure if this is expected behaviour on forms or a bug. -
VCL Handling of dpi changes - poor performance
Vincent Parrett replied to Vincent Parrett's topic in VCL
You would think so, however, VCL Styles were added in XE2 and I think it wasn't until 10.3 they were added to the IDE, and even then the IDE is using custom themes (notice we can't just select any vcl theme). So they don't have a great track record of dogfooding new features. -
@ewong You should not, under any circumstances, update vcl controls in a thread other than the main thread. If it's just updating a progress bar, you can do that quite simply by using PostMessage and send a user message to the form https://www.cryer.co.uk/brian/delphi/howto_send_custom_window_message.htm Use PostMessage (non blocking) rather than SendMessage (blocking). Working with threads in Delphi is harder than it needs to be. I recommend taking a look at https://github.com/gabr42/OmniThreadLibrary I also created a nice wrapper for omnithread that makes running tasks in background threads really simple : https://github.com/VSoftTechnologies/VSoft.Awaitable I've been using this in my projects for a while now (I was already using OmniThread) and it makes things so much simpler!
-
And I have to say, Why TF isn't something like this built into the IDE?? Nice work. It almost feels like I'm using visual studio 2012 I ended up using Shift+Ctrl+U as the shortcut so I never have to see the crappy default one - which I accidently invoked a few times now. Now for the first feature request 😉. Can you index my project search path? I just tried to us it to add Spring.Collections - but that is installed via dpm - so it's on my search path (via an msbuild property). This tool as a ton of potential... I know you don't have the time to work on it but others might, if you put it on github 😉
-
Huh, restarted the IDE again (third time) and now it works. Nice!
-
I tried, but cannot get it to show. Shift+Ctr+A just locks the IDE for about 20 seconds and then the default uses thingy (I forgot how bad it is) shows. I tried changing the shortcut but then nothing happens. Testing with 10.4.2
-
VCL Handling of dpi changes - poor performance
Vincent Parrett replied to Vincent Parrett's topic in VCL
One last one before I give up for the day.. I added a few more outputdebugstring calls. Debug Output: TForm3.WMDpiChanged - dpi : 144 Process HighDPIDragTest.exe (52784) Debug Output: TForm3.Paint Process HighDPIDragTest.exe (52784) Debug Output: TMyPanel.AlignControls - dpi : 144 Process HighDPIDragTest.exe (52784) Debug Output: TForm3.AlignControls - dpi : 144 Process HighDPIDragTest.exe (52784) Debug Output: TForm3.Paint Process HighDPIDragTest.exe (52784) Debug Output: TMyPanel.AlignControls - dpi : 144 Process HighDPIDragTest.exe (52784) Debug Output: TForm3.WMSize- before inherited - dpi : 144 Process HighDPIDragTest.exe (52784) Debug Output: TForm3.AlignControls - dpi : 144 Process HighDPIDragTest.exe (52784) Debug Output: TForm3.WMSize - after inherited Process HighDPIDragTest.exe (52784) Debug Output: TForm3.WMSize- before inherited - dpi : 144 Process HighDPIDragTest.exe (52784) Debug Output: TForm3.AlignControls - dpi : 144 Process HighDPIDragTest.exe (52784) Debug Output: TMyPanel.AlignControls - dpi : 144 Process HighDPIDragTest.exe (52784) Debug Output: TForm3.WMSize - after inherited Process HighDPIDragTest.exe (52784) Debug Output: TForm3.AlignControls - dpi : 144 Process HighDPIDragTest.exe (52784) Debug Output: TForm3.Paint Process HighDPIDragTest.exe (52784) Debug Output: TForm3.Paint Process HighDPIDragTest.exe (52784) Debug Output: TForm3.Paint Process HighDPIDragTest.exe (52784) Debug Output: TMyPanel.Paint Process HighDPIDragTest.exe (52784) All that painting doesn't make it look any prettier 🙄 This doesn't look to be something that can be fixed with a patch or detour etc, it's going to take a rewrite of swathes of the vcl code -
VCL Handling of dpi changes - poor performance
Vincent Parrett replied to Vincent Parrett's topic in VCL
Ok, so I can definitively say this is a design flaw in the VCL - we are not doing anything wrong. The bug is in TCustomForm.ScaleForPPIRect the call to ScaleControlsForDpi(NewPPI) causes AlignControls to be called on the child controls and the form (depth first) - which is fine, and expected. My debug output looks like this : Debug Output: TMyPanel.AlignControls - dpi : 144 Process HighDPIDragTest.exe (3164) Debug Output: TForm3.AlignControls - dpi : 144 Process HighDPIDragTest.exe (3164) Then a few lines further down in TCustomForm.ScaleForPPIRect, it calls SetBounds and all hell breaks loose! Debug Output: TForm3.WMSize- before inherited - dpi : 144 Process HighDPIDragTest.exe (3164) Debug Output: TForm3.AlignControls - dpi : 144 Process HighDPIDragTest.exe (3164) Debug Output: TForm3.WMSize - after inherited Process HighDPIDragTest.exe (3164) Debug Output: TForm3.WMSize- before inherited - dpi : 144 Process HighDPIDragTest.exe (3164) Debug Output: TForm3.AlignControls - dpi : 144 Process HighDPIDragTest.exe (3164) Debug Output: TMyPanel.AlignControls - dpi : 144 Process HighDPIDragTest.exe (3164) Debug Output: TForm3.WMSize - after inherited Process HighDPIDragTest.exe (3164) Then it calls Realign Debug Output: TForm3.AlignControls - dpi : 144 Process HighDPIDragTest.exe (55256) So the form's AlignControls method is called 3 times, and on the panel 3 times! It should be noted that the number of times for each control depends on it or other child controls anchor or align settings (see Vcl.Controls AlignWork function), It's no wonder that things look so bad, it's because they are. Testing in 10.4.2 with VCL Styles enabled - but the code looks the same for 10.3 so this is not new. -
VCL Handling of dpi changes - poor performance
Vincent Parrett replied to Vincent Parrett's topic in VCL
I spent some more time looking at this and I can only describe it as a clusterf*ck. The issue is that as the application crosses over monitors, the form receives a WM_SIZE message, which calls AlignControls (which on a complex form or container control can be very slow). Cue mega rearranging of controls and repainting. Then the application received WM_DPICHANGED, which calls SetBounds, ChangeScale (which calls AlignControls) and more arranging and repainting occurs. Then add VCL Styles into the mix - for some reason with VCL Styles that WM_SIZE get's sent twice, and then the WM_DPICHANGED is sent. I have no idea why it's sent twice, but I doubt windows is doing it. I'm not even sure windows is sending the WM_SIZE at all (still investigating this). Anyway, the upshot of this is the more controls you have on a form the worse this issue will be. -
VCL Handling of dpi changes - poor performance
Vincent Parrett replied to Vincent Parrett's topic in VCL
I already had that in place, but in this case enabling/disabling that didn't seem to make much difference. LOL! I had forgotten about that thread (which I posted in), and it didn't come up when I was searching. FWIW, LockWindowUpdate did work for me in the WMDpiChanged handler - but setredraw seemed slightly safer. I've been trying to profile what is happening but the lack of a decent profiler is killing me! I've been using the sampling profiler, and it does show AlignControls showing up a lot (which is a known performance issue), need to investigate further. -
Gotta support all those 386's that are still floating around 🙄 voted.