optimization ?
HP Wei
hp@REDACTED
Wed Apr 23 01:34:12 CEST 2003
Thank you very much for giving various pointers.
I will pick up the tool fprof.
I looked at the codes in file.erl in the lib/kernel/src and found
that all system file related operations are done through a file server.
The overhead perhaps explains why this function for extracting
a list of subdirectories is slow (in comparison to python's version
which calls a C-function directly as I understand).
Perhaps, if necessary, I will
need to study the foreign language interface in Erlang.
--HP
>According to fprof function spends most time in {file,read_link_info}:
> CNT ACC
>{test,dirs,3} 1086 2365.887
>{file,read_link_info,1} 1010 2152.686
>{erlang,'++',2}, 1085 24.044
----------------------
>Anyway, it looks like the real culprit is file:read_link_info
More information about the erlang-questions
mailing list