Limit output or abort "restic find"

Hello!
I have to write a small WebGUI to let users restore/download there backed files from Restic.

One basic concept is to find files from grabbing the output of “restic find”. Now i have to limit the output, because it could be that someone would enter “/*/”. In this case i have to analyze about 200000 lines for each day. After tree years that would be 200 millions datasets.

even if i could handle the output in a acceptable time, i think restic itself would take to long to give me results. There should be a per-keypress-filter so i think the most acceptable time would be 5 seconds (in such a hard case like above).

Is there a way to let restic limit “find”-output to maybe 10000 lines? Or do you think its no problem for restic to output that data very fast? Just pipe it through “head -n 10000” and i am fine?

Thanks and greets from bavaria!
Freisei