I agree that realizing in a list is a bad idea.

It's good that you choose the value 10 empirically. That's probably the best option.

I might do something like: test if len(raw_documents) work, if so take a fraction of that (say 50, that way we fall back on your empirical result), and if not, use 10.