@Override
    public Integer call() throws Exception {
        long start = System.currentTimeMillis();
        TikaVisitor v = new TikaVisitor();
        if (fileList != null) {
            TikaVisitor tikaVisitor = new TikaVisitor();
            try (BufferedReader reader = Files.newBufferedReader(fileList, StandardCharsets.UTF_8)) {
                String line = reader.readLine();
                while (line != null) {
                    Path inputFile = inputRoot.resolve(line.trim());
                    if (Files.isReadable(inputFile)) {
                        try {
                            tikaVisitor.visitFile(inputFile, Files.readAttributes(inputFile, BasicFileAttributes.class));
                        } catch (IOException e) {
                            LOG.warn("Problem with: " + inputFile, e);
                        }
                    } else {
                        LOG.warn("Not readable: " + inputFile);
                    }
                    line = reader.readLine();
                }
            }
        } else {
            Files.walkFileTree(inputRoot, v);
        }
        int processed = v.getProcessed();
        double elapsedSecs = ((double) System.currentTimeMillis() - (double) start) / (double) 1000;
        LOG.info("Finished processing {} files in {} seconds.", processed, elapsedSecs);
        return processed;
    }
Simple single-threaded class that calls tika-app against every file in a directory.
<p>
This is exceedingly robust.  One file per process.
<p>
However, you can use this to compare performance against tika-batch fs code.
tika-batch/src/main/java/org/apache/tika/batch/fs/strawman/StrawManTikaAppDriver.java