Skip to content

Reflow v1.22.0

Compare
Choose a tag to compare
@jimclune jimclune released this 07 Jun 23:11

Notable features:

  • Performance improvements in certain reflow execs (primarily due to reduction in unnecessary CPU usage)
  • Support for comprehensions on dir types in reflow, which provide better performance than converting to lists or maps and then doing list/map comprehensions. Details below.

Dir comprehensions yield (path, file) pairs. For example, after running:

d := dir("/home/notes")
result := [ strings.Join([path, "has", strings.FromInt(len(f)), "bytes"], " ") | (path, f) <- d, if strings.HasSuffix(path, ".txt") ]

result contains a list of strings based on the files in /home/notes with the ".txt" extension, such as:
["foo.txt has 725 bytes", "bar.txt has 89 bytes", "zoo.txt has 7061 bytes"]

For improved performance, please use dir comprehensions in places where a dir was previously converted to a list or map. For example, it is generally recommended to replace:
[ (name, f) | (name, f) < list(someDir)]
and
[ (name, f) | (name, f) < map(someDir)]
with
[ (name, f) | (name, f) < someDir]