Improve performance for directory listing.