It seems that there is a bottleneck in that function. It was figured out when I was working on #2242.
The function read the same file or directory all the time.
It could be better if it were added a cache.
However, the best thing to do is investigating if it is really necessary call that function all the time.
Doing this in the function and running the tests:
Note: This teste was only in the Package basic.
function isFile(file)
mandatoryArgument(1, "string", file)
_Gtme.print(" ", "-----------------------", file, lfs.attributes(file, "mode"))
return lfs.attributes(file, "mode") == "file"
end
It seems that there is a bottleneck in that function. It was figured out when I was working on #2242. The function read the same file or directory all the time. It could be better if it were added a cache. However, the best thing to do is investigating if it is really necessary call that function all the time.
Doing this in the function and running the tests: Note: This teste was only in the Package basic.