earroyoron
02/24/2020, 6:34 AMFile.readLines
is discouraged for big files.
I suppose is just because it builds a List
so of course a Sequence
is preferred.
But, does this advice apply also to:
val stream: Flow<String> = File(arguments.filename).readLines().asFlow()
?
Not sure if the composer maybe optimise this to not have the full list before flowing,...Fleshgrinder
02/24/2020, 7:37 AMChantry Cargill
02/24/2020, 8:11 AMearroyoron
02/24/2020, 8:47 PM