When PlantUML is started or the working directory is changed to a folder where several text files (>10 files with ~3KB text size) are present then PlantUML fails to generate some of the images because it runs out of memory.
The current workaround I use is to increase the heap allocated to Java VM but this is not a solution.
The best solution would be for PlatUML to generate in parallel only a subset from the full list of files (ex: 4 files) and when those are completed the next 4 files are proccessed and so on and so forth.
In case of file change notifications the same algorithm could be applied.