From: Len S. <le...@wi...> - 2022-04-30 00:03:46
|
Hello, file:directory-list(’/slowdir’,’*.*') has been super slow. ‘/slowdir’ is a small directory on my workstation’s flash drive. This directory does contain some symbolic links to large directories on the large external disk drives, so it does appear to be traversing down the directory tree. Every time I run it, my large external drives are thrashing. That explains why it’s slow. https://exist-db.org/exist/apps/fundocs/view.html?uri=http://exist-db.org/xquery/file states: List all files, including their file size and modification time, found in or below a directory, $directory. Files are located in the server's file system, using filename patterns, $pattern. File pattern matching is based on code from Apache's Ant, thus following the same conventions. For example: '*.xml' matches any file ending with .xml in the current directory, - '**/*.xml' matches files in any directory below the specified directory. This method is only available to the DBA role. So my $pattern is only matching the current directory, but exist-db is still scanning all subdirectories. Any ideas of how I can avoid it scanning subdirectories? I’m running exist-db 5.3. I swear this was fast with 5.2, so maybe something changed in the code where it now always scans subdirectories? But my subdirectories have gotten much larger over time, so maybe that’s the difference. --len |