There seems to be a big difference in performance between running an "ls -l" command in eshell over tramp and opening a dired buffer for the same remote directory. Opening the dired buffer appears to be a lot faster.
When looking at the tramp debug info, the "ls -l" command is running the "tramp-do-file-attributes-with-perl" function for every file in the folder, while for the dired buffer this function is called only once, for the folder (not for every file).
Is there a way to change this behavior through configuration settings?