DirectoryLoader Slow when there are too many exclusions #23877
siyanda4navilabs
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've been trying to upload a lot of files (~15/20k) while also trying to exclude files (100k) that have been already uploaded, let's say something like:
it was taking days which was quite unusual and was hanging, then I saw this:
if both self.exclude and paths are large (like in my case )this becomes O( N*M ~N^2).
I propose something that would be a bit faster than this:
import fnmatch
This solution will still not completely resolve the problem but using-fnmatch will definitely reduce it
Beta Was this translation helpful? Give feedback.
All reactions