Mail Archives: djgpp-workers/2002/10/25/11:52:29
I found out that _use_lfn() have non zero weight, according to the profile:
0.00 0.00 27/40929 _chmod [208]
0.01 0.00 4070/40929 _truename [62]
0.01 0.00 4088/40929 _fixpath [36]
0.01 0.00 4090/40929 __findfirst [66]
0.01 0.00 4115/40929 __findnext [129]
0.03 0.02 24497/40929 _lfn_gen_short_fname [95]
[58] 0.6 0.06 0.03 40929 _use_lfn [58]
0.03 0.00 4090/8256 getenv [79]
0.00 0.00 4089/4089 _get_volume_info [323]
-----------------------------------------------
I wonder why _use_lfn repeatedly calls getenv() and _get_volume_info().
Not a big overhead but could this be improved?
Function calls with 0 arg ( _USE_LFN macro)
mixed with nonzero arg from __fixpath()
Also, numerous getenv() calls occured from _preserve_fncase()
which called in turn from _fixpath().
Numbers doesn't change whether $LFN env is set to 'y'/'n' or unset.
The program (kind of stat() on directory entries) runs on the same
DOS drive, and the $LFN env was not changed.
-----------------------------------------------
0.00 0.00 3/4109 __getcwd [230]
0.00 0.00 18/4109 opendir [176]
0.00 0.03 4088/4109 _fixpath [36]
[103] 0.2 0.00 0.03 4109 _preserve_fncase [103]
0.03 0.00 4109/8256 getenv [79]
-----------------------------------------------
0.00 0.00 13/8256 __crt0_load_environment_file [148]
0.00 0.00 18/8256 override_proxy [138]
0.03 0.00 4090/8256 _use_lfn [58]
0.03 0.00 4109/8256 _preserve_fncase [103]
[79] 0.4 0.06 0.00 8256 getenv [79]
0.00 0.00 10/10 set_hash_env [284]
-----------------------------------------------
<spontaneous>
[36] 1.1 0.11 0.04 _fixpath [36]
0.00 0.03 4088/4109 _preserve_fncase [103]
0.01 0.00 4088/40929 _use_lfn [58]
0.00 0.00 20399/86646 strcmp [305]
-----------------------------------------------
- Raw text -