Re: slow startup on windows

"John Selverian" <[email protected]> Wed, 26 Apr 2023 13:03:41 -0400
Newsgroups gmane.comp.lib.fox-toolkit.user
Organization JAHM Software
Message-ID <[email protected]>
I only get output with this:

#ifdef DEBUG
   new FXMenuCommand(helpmenu,"&Dump
Widgets",nullptr,getApp(),FXApp::ID_DUMP);
#endif


The entire output is only 1362 lines so there not too many
widgets.

I define DBUG in the preprocessor. I'm going to look into my
compiler settings so see if there is any thing there causing
this. I have all optimizations turned off.

Thanks for the suggestions.




-----Original Message-----
From: [email protected] <[email protected]> 
Sent: Wednesday, April 26, 2023 12:15 PM
To: [email protected]
Cc: 'Jeroen van der Zijp' <[email protected]>;
[email protected]
Subject: Re: [Foxgui-users] slow startup on windows

On 2023-04-26 10:08, John Selverian wrote:
> I must be missing something, I open a PowerShell window and
run:
> 
> ./MPDB_win_debug -tracelevel 100
> 
> The program starts, then I exit it but I do not see any output,
I'm 
> assuming it would output to the PowerShell window I started it
from.

I assume the code has been compiled with -DDBUG=1 and NOT with
-DNDEBUG=1 ??

You will never see trace output if the pre-processor has defined
FXTRACE()
as empty:

   #ifndef NDEBUG
   #define FXTRACE(arguments) FX::fxtrace arguments
   #else
   #define FXTRACE(arguments) ((void)0)
   #endif

Optimized, release mode (--enable-release) will defined NDEBUG.
Debug build (--enable-debug), or "vanilla" (no options) will not
set NDEBUG.

If you're using DLLs, make sure the DLL your actually referencing
is the one compiled with debug mode.

On Windows, trace output is sent to "Debug Window" as well as
stderr when _WINDOWS has been set [the debug window should show
the output in VC++]].

I can check tonight when I get back home if all this works as
expected with some other FOX programs.

FYI i've never seen the weird slowdown; maybe the size of the s/w
matters, and I'm simply not seeing it due to running smaller
apps.

You can add a "debug" menu option to dump widget tree, send
ID_DUMP to FXApp instance, it will recursively dump the entire
widget tree in existance at the time [or call app->dumpWidgets()
directly, of course...].

#ifdef DEBUG
   new FXMenuCommand(helpmenu,"&Dump
Widgets",nullptr,getApp(),FXApp::ID_DUMP);
#endif

You can see if there are unusual numbers of widgets; 10s of
thousands is probably OK, but 100s of thousands may be
problematic.


          -- JVZ