> S> Making this gives a memory footprint of 6,564K when window allowed to show.
> S> Timings for hacked OnInit:
> S>
> S> real 0m2.084s
> S> user 0m0.031s
> S> sys 0m0.016s
>
> I really can't explain this. Can anybody else reproduce these results?
I'm not sure what program those results are coming from?
One thing to watch for under Windows is that all directories in the
path actually exist.
If PATH contains a directory that is not really there, the program may
spend time searching the broken path until some timeout is reached.
I've never seen a number given for the time out value but I have had
it turn compiles that should take seconds in to compiles that take
minutes.
If Minimal is also searching a non-existent path trying to find DLLs
that may explain what is going on, why it does not show up cross
compiling nor on most other machines.
Si what happens if your force you PATH to only be what is required
from a DOS box and run Minimal from there?
Running the static Minimal sample with it returning false from OnInit
I see the frame flash on the screen. I do not see such a flash with
the DLL build.
The DLL build takes about two seconds to appear when OnInit returns
true. The static build takes less than a second to appear with OnInit
true.
Top few results of timing with ProcMon (with really bad formating due
to line wrap :-( ).
Using GCC 4.7.1 from
http://nuwen.net/mingw.html on a quad core Win64
Windows 7 machine with 8G of RAM, I get the following using System
Internals ProcMon, with OnInit returning false. Sorted by duration
large to small, this is what I get:
DLL:
Time of Day Process Name PID Operation Path Result
Detail Relative Time Duration
05:52.5 minimal.exe 3356 CreateFile
C:\Windows\Prefetch\
MINIMAL.EXE-325451AB.pf NAME NOT FOUND
Desired Access: Generic Read, Disposition: Open, Options: Synchronous
IO Non-Alert, Attributes: n/a, ShareMode: None, AllocationSize: n/a
00:10.1 0.0000762
05:53.6 minimal.exe 3356 CreateFile
C:\Windows\SysWOW64\ole32.dll SUCCESS Desired Access: Read
Attributes, Disposition: Open, Options: Open Reparse Point,
Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a,
OpenResult: Opened 00:11.2 0.0000691
05:53.6 minimal.exe 3356 RegQueryKey
HKLM\SOFTWARE\Microsoft\CTF\TIP SUCCESS Query: HandleTags, HandleTags:
0x400 00:11.2 0.0000614
05:52.5 minimal.exe 3356 CreateFile
C:\Windows\System32\wow64cpu.dll SUCCESS Desired Access: Read
Data/List Directory, Execute/Traverse, Synchronize, Disposition: Open,
Options: Synchronous IO Non-Alert, Non-Directory File, Attributes:
n/a, ShareMode: Read, Delete, AllocationSize: n/a, OpenResult: Opened
00:10.1 0.000043
05:52.5 minimal.exe 3356 CreateFile
J:\WX\294\lib\gcc_dll\wxbase294u_gcc_custom.dll SUCCESS Desired
Access: Read Data/List Directory, Execute/Traverse, Synchronize,
Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory
File, Attributes: n/a, ShareMode: Read, Delete, AllocationSize: n/a,
OpenResult: Opened 00:10.1 0.0000373
05:52.5 minimal.exe 3356 CloseFile
C:\Windows\SysWOW64\sechost.dll SUCCESS 00:10.1 0.0000347
05:52.5 minimal.exe 3356 CreateFile
C:\Windows\System32\wow64.dll SUCCESS Desired Access: Read Data/List
Directory, Execute/Traverse, Synchronize, Disposition: Open, Options:
Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a,
ShareMode: Read, Delete, AllocationSize: n/a, OpenResult: Opened
00:10.1 0.0000344
05:52.5 minimal.exe 3356 CreateFile
C:\Windows\SysWOW64\sechost.dll SUCCESS Desired Access: Read Data/List
Directory, Execute/Traverse, Synchronize, Disposition: Open, Options:
Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a,
ShareMode: Read, Delete, AllocationSize: n/a, OpenResult: Opened
00:10.1 0.0000335
05:53.6 minimal.exe 3356 CreateFile
C:\Windows\Fonts\StaticCache.dat SUCCESS Desired Access:
Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert,
Non-Directory File, Attributes: n/a, ShareMode: Read, Delete,
AllocationSize: n/a, OpenResult: Opened 00:11.2 0.0000331
05:52.5 minimal.exe 3356 CreateFile
C:\Windows\System32\wow64win.dll SUCCESS Desired Access: Read
Data/List Directory, Execute/Traverse, Synchronize, Disposition: Open,
Options: Synchronous IO Non-Alert, Non-Directory File, Attributes:
n/a, ShareMode: Read, Delete, AllocationSize: n/a, OpenResult: Opened
00:10.1 0.0000312
05:52.5 minimal.exe 3356 CreateFile
C:\Windows\WindowsShell.Manifest SUCCESS Desired Access:
Generic Read/Execute, Disposition: Open, Options: Synchronous IO
Non-Alert, Non-Directory File, Attributes: n/a, ShareMode: Read,
Delete, AllocationSize: n/a, OpenResult: Opened 00:10.1 0.000029
05:53.6 minimal.exe 3356 CreateFile C:\Program Files
(x86)\McAfee\SiteAdvisor\saSets.ini SUCCESS Desired Access: Generic
Read, Disposition: Open, Options: Synchronous IO Non-Alert,
Non-Directory File, Attributes: n/a, ShareMode: Read, Write, Delete,
AllocationSize: n/a, OpenResult: Opened 00:11.2 0.0000287
05:53.6 minimal.exe 3356 CreateFile C:\Program Files
(x86)\McAfee\SiteAdvisor\sahook.dll SUCCESS Desired Access: Generic
Read, Disposition: Open, Options: Synchronous IO Non-Alert,
Non-Directory File, Attributes: n/a, ShareMode: Read, Delete,
AllocationSize: n/a, OpenResult: Opened 00:11.2 0.0000284
05:52.5 minimal.exe 3356 CreateFile
C:\Windows\SysWOW64\winspool.drv SUCCESS Desired Access: Read
Data/List Directory, Execute/Traverse, Synchronize, Disposition: Open,
Options: Synchronous IO Non-Alert, Non-Directory File, Attributes:
n/a, ShareMode: Read, Delete, AllocationSize: n/a, OpenResult: Opened
00:10.1 0.0000283
05:53.6 minimal.exe 3356 CreateFile
C:\Windows\SysWOW64\ole32.dll SUCCESS Desired Access: Read Data/List
Directory, Execute/Traverse, Synchronize, Disposition: Open, Options:
Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a,
ShareMode: Read, Delete, AllocationSize: n/a, OpenResult: Opened
00:11.2 0.0000283
05:53.6 minimal.exe 3356 QueryNameInformationFile
C:\Windows\SysWOW64\imm32.dll SUCCESS Name:
\Windows\SysWOW64\imm32.dll 00:11.2 0.0000268
05:52.5 minimal.exe 3356 CreateFile
J:\WX\294\lib\gcc_dll\wxmsw294u_core_gcc_custom.dll SUCCESS
Desired Access: Read Data/List Directory, Execute/Traverse,
Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert,
Non-Directory File, Attributes: n/a, ShareMode: Read, Delete,
AllocationSize: n/a, OpenResult: Opened 00:10.1 0.0000261
05:52.5 minimal.exe 3356 CreateFile
C:\Windows\System32\wow64log.dll NAME NOT FOUND Desired
Access: Read Attributes, Disposition: Open, Options: Open Reparse
Point, Attributes: n/a, ShareMode: Read, Write, Delete,
AllocationSize: n/a 00:10.1 0.0000258
05:52.5 minimal.exe 3356 CreateFile
C:\Windows\SysWOW64\sechost.dll SUCCESS Desired Access: Read
Attributes, Disposition: Open, Options: Open Reparse Point,
Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a,
OpenResult: Opened 00:10.1 0.0000258
05:53.6 minimal.exe 3356 CreateFile
C:\Windows\SysWOW64\ole32.dll SUCCESS Desired Access: Read Data/List
Directory, Execute/Traverse, Synchronize, Disposition: Open, Options:
Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a,
ShareMode: Read, Delete, AllocationSize: n/a, OpenResult: Opened
00:11.2 0.0000258
05:52.5 minimal.exe 3356 CreateFile
C:\Windows\System32\wow64cpu.dll SUCCESS Desired Access: Read
Attributes, Disposition: Open, Options: Open Reparse Point,
Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a,
OpenResult: Opened 00:10.1 0.0000245
05:52.5 minimal.exe 3356 CreateFile
C:\Windows\System32\wow64win.dll SUCCESS Desired Access: Read
Attributes, Disposition: Open, Options: Open Reparse Point,
Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a,
OpenResult: Opened 00:10.1 0.0000242
05:52.5 minimal.exe 3356 CreateFile
C:\Windows\SysWOW64\wxbase294u_gcc_custom.dll NAME NOT FOUND
Desired Access: Read Attributes, Disposition: Open, Options: Open
Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete,
AllocationSize: n/a 00:10.1 0.0000242
05:52.5 minimal.exe 3356 CreateFile
C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2\comctl32.dll
SUCCESS Desired Access: Read Data/List Directory,
Execute/Traverse, Synchronize, Disposition: Open, Options: Synchronous
IO Non-Alert, Non-Directory File, Attributes: n/a, ShareMode: Read,
Delete, AllocationSize: n/a, OpenResult: Opened 00:10.1 0.0000242
05:52.5 minimal.exe 3356 CloseFile
C:\Windows\System32\wow64cpu.dll SUCCESS 00:10.1
0.0000239
05:53.5 minimal.exe 3356 CreateFile
C:\Windows\SysWOW64\uxtheme.dll SUCCESS Desired Access: Read Data/List
Directory, Execute/Traverse, Synchronize, Disposition: Open, Options:
Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a,
ShareMode: Read, Delete, AllocationSize: n/a, OpenResult: Opened
00:11.1 0.0000239
05:52.5 minimal.exe 3356 CreateFile C:\Windows
SUCCESS Desired Access: Execute/Traverse, Synchronize, Disposition:
Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a,
ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened
00:10.1 0.0000232
05:52.5 minimal.exe 3356 RegOpenKey
HKLM\System\CurrentControlSet\Control\Session Manager SUCCESS
Desired Access: Read 00:10.1 0.000023
05:52.5 minimal.exe 3356 CreateFile
C:\Windows\System32\wow64.dll SUCCESS Desired Access: Read
Attributes, Disposition: Open, Options: Open Reparse Point,
Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a,
OpenResult: Opened 00:10.1 0.0000229
05:52.5 minimal.exe 3356 CreateFile
C:\Windows\SysWOW64\imm32.dll SUCCESS Desired Access: Read Data/List
Directory, Synchronize, Disposition: Open, Options: Synchronous IO
Non-Alert, Non-Directory File, Attributes: n/a, ShareMode: Read,
Delete, AllocationSize: n/a, OpenResult: Opened 00:10.1 0.0000226
05:53.6 minimal.exe 3356 CreateFile C:\Program Files
(x86)\McAfee\SiteAdvisor\sahook.dll SUCCESS Desired Access: Read
Data/List Directory, Execute/Traverse, Synchronize, Disposition: Open,
Options: Synchronous IO Non-Alert, Non-Directory File, Attributes:
n/a, ShareMode: Read, Delete, AllocationSize: n/a, OpenResult: Opened
00:11.2 0.0000226
Static:
Time of Day Process Name PID Operation Path Result
Detail Relative Time Duration
08:19.1 minimal.exe 4048 RegEnumKey
HKLM\SOFTWARE\Microsoft\CTF\TIP SUCCESS Index: 4, Name:
{531FDEBF-9B4C-4A43-A2AA-960E8FCDC732} 00:03.1 0.0000854
08:19.0 minimal.exe 4048 CreateFile
C:\Windows\Prefetch\
MINIMAL.EXE-0EBAAEBF.pf NAME NOT FOUND
Desired Access: Generic Read, Disposition: Open, Options: Synchronous
IO Non-Alert, Attributes: n/a, ShareMode: None, AllocationSize: n/a
00:03.0 0.0000793
08:19.0 minimal.exe 4048 CreateFile
C:\Windows\System32\wow64cpu.dll SUCCESS Desired Access: Read
Data/List Directory, Execute/Traverse, Synchronize, Disposition: Open,
Options: Synchronous IO Non-Alert, Non-Directory File, Attributes:
n/a, ShareMode: Read, Delete, AllocationSize: n/a, OpenResult: Opened
00:03.0 0.0000742
08:19.0 minimal.exe 4048 CreateFile
C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2\comctl32.dll
SUCCESS Desired Access: Read Data/List Directory,
Execute/Traverse, Synchronize, Disposition: Open, Options: Synchronous
IO Non-Alert, Non-Directory File, Attributes: n/a, ShareMode: Read,
Delete, AllocationSize: n/a, OpenResult: Opened 00:03.1 0.0000739
08:19.0 minimal.exe 4048 CreateFile
C:\Windows\SysWOW64\sechost.dll SUCCESS Desired Access: Read Data/List
Directory, Execute/Traverse, Synchronize, Disposition: Open, Options:
Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a,
ShareMode: Read, Delete, AllocationSize: n/a, OpenResult: Opened
00:03.0 0.0000733
08:19.0 minimal.exe 4048 CreateFile
C:\Windows\System32\wow64win.dll SUCCESS Desired Access: Read
Data/List Directory, Execute/Traverse, Synchronize, Disposition: Open,
Options: Synchronous IO Non-Alert, Non-Directory File, Attributes:
n/a, ShareMode: Read, Delete, AllocationSize: n/a, OpenResult: Opened
00:03.0 0.0000704
08:19.0 minimal.exe 4048 CreateFile
C:\Windows\System32\wow64.dll SUCCESS Desired Access: Read Data/List
Directory, Execute/Traverse, Synchronize, Disposition: Open, Options:
Synchronous IO Non-Alert, Non-Directory File, Attributes: n/a,
ShareMode: Read, Delete, AllocationSize: n/a, OpenResult: Opened
00:03.0 0.0000656
08:19.0 minimal.exe 4048 CreateFile
C:\Windows\System32\wow64cpu.dll SUCCESS Desired Access: Read
Attributes, Disposition: Open, Options: Open Reparse Point,
Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a,
OpenResult: Opened 00:03.0 0.0000564
08:19.0 minimal.exe 4048 CloseFile
C:\Windows\SysWOW64\sechost.dll SUCCESS 00:03.0 0.0000516
08:19.0 minimal.exe 4048 CreateFile
C:\Windows\System32\wow64log.dll NAME NOT FOUND Desired
Access: Read Attributes, Disposition: Open, Options: Open Reparse
Point, Attributes: n/a, ShareMode: Read, Write, Delete,
AllocationSize: n/a 00:03.0 0.0000503
08:19.0 minimal.exe 4048 CreateFile
C:\Windows\System32\wow64win.dll SUCCESS Desired Access: Read
Attributes, Disposition: Open, Options: Open Reparse Point,
Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a,
OpenResult: Opened 00:03.0 0.0000493
08:19.0 minimal.exe 4048 CreateFile
C:\Windows\System32\wow64.dll SUCCESS Desired Access: Read
Attributes, Disposition: Open, Options: Open Reparse Point,
Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a,
OpenResult: Opened 00:03.0 0.0000481
08:19.0 minimal.exe 4048 CreateFile
C:\Windows\SysWOW64\sechost.dll SUCCESS Desired Access: Read
Attributes, Disposition: Open, Options: Open Reparse Point,
Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a,
OpenResult: Opened 00:03.0 0.0000478
08:19.0 minimal.exe 4048 CreateFile
C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2\comctl32.dll
SUCCESS Desired Access: Read Attributes, Disposition: Open,
Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write,
Delete, AllocationSize: n/a, OpenResult: Opened 00:03.1
0.0000468
08:19.1 minimal.exe 4048 CreateFile C:\Program Files
(x86)\McAfee\SiteAdvisor\saSets.ini SUCCESS Desired Access: Generic
Read, Disposition: Open, Options: Synchronous IO Non-Alert,
Non-Directory File, Attributes: n/a, ShareMode: Read, Write, Delete,
AllocationSize: n/a, OpenResult: Opened 00:03.1 0.0000442
08:19.1 minimal.exe 4048 CreateFile
C:\Windows\WindowsShell.Manifest SUCCESS Desired Access:
Generic Read/Execute, Disposition: Open, Options: Synchronous IO
Non-Alert, Non-Directory File, Attributes: n/a, ShareMode: Read,
Delete, AllocationSize: n/a, OpenResult: Opened 00:03.1
0.0000436
08:19.0 minimal.exe 4048 CreateFile
C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2
SUCCESS Desired Access: Read Attributes, Disposition: Open, Options:
Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete,
AllocationSize: n/a, OpenResult: Opened 00:03.1 0.0000433
08:19.0 minimal.exe 4048 CreateFile
C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2
SUCCESS Desired Access: Execute/Traverse, Synchronize, Disposition:
Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a,
ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened
00:03.1 0.0000433
08:19.1 minimal.exe 4048 RegOpenKey
HKLM\SOFTWARE\Policies\Microsoft\Windows\App Management NAME NOT FOUND
Desired Access: Query Value 00:03.1 0.000043
08:19.0 minimal.exe 4048 CreateFile C:\Windows
SUCCESS Desired Access: Read Attributes, Synchronize, Disposition:
Open, Options: Synchronous IO Non-Alert, Attributes: n/a, ShareMode:
Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
00:03.0 0.0000427
08:19.0 minimal.exe 4048 CreateFile C:\Windows
SUCCESS Desired Access: Execute/Traverse, Synchronize, Disposition:
Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a,
ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened
00:03.0 0.0000392
08:19.0 minimal.exe 4048 RegOpenKey
HKLM\Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Image
File Execution Options SUCCESS Desired Access: Query Value,
Enumerate Sub Keys 00:03.0 0.0000392
08:19.1 minimal.exe 4048 ReadFile C:\Program Files
(x86)\McAfee\SiteAdvisor\saSets.ini SUCCESS Offset: 0, Length:
1,518, Priority: Normal 00:03.1 0.0000383
08:19.1 minimal.exe 4048 CreateFile C:\Program Files
(x86)\McAfee\SiteAdvisor\sahook.dll SUCCESS Desired Access: Read
Data/List Directory, Execute/Traverse, Synchronize, Disposition: Open,
Options: Synchronous IO Non-Alert, Non-Directory File, Attributes:
n/a, ShareMode: Read, Delete, AllocationSize: n/a, OpenResult: Opened
00:03.1 0.0000376
08:19.0 minimal.exe 4048 CreateFile
J:\WX\294\samples\minimal SUCCESS Desired Access:
Execute/Traverse, Synchronize, Disposition: Open, Options: Directory,
Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write,
AllocationSize: n/a, OpenResult: Opened 00:03.0 0.0000373