A function returning file contents?

If you want to speed up, try the local sqlite database... see my extension here App Inventor Extensions: SQlite | Pura Vida Apps there are also other sqlite extensions...
See also a speed comparison between TinyDB and Sqlite in Q9 there

Generally see also

Taifun