I’ve been working on processing a large amount of files with lisp and encountering an issue listing directory contents when there are millions of files in a directory.
I found cl-fad and the (list-directory "./data")
function, but this loads the entire list of files into memory which exhausts the heap and fails. Found similar behavior using the uiop functions such as (uiop:directory-files "./data")
Are there any existing options for traversing each file in the directory without loading all the filenames into memory?