butterfly icon indicating copy to clipboard operation
butterfly copied to clipboard

Improve performance when manipulating the same file multiple times

Open fabiocarvalho777 opened this issue 6 years ago • 0 comments

Reading and writing files multiple times are definitely expensive operations, since they are IO related.

Often Butterfly would open, read, write and close the same file multiple times during the same transformation. There could be a way to avoid that, or at least reduce the amount of IO, when manipulating specific type of files that can be entirely modeled and kept in memory, like properties files or Maven pom files, as long as they are not too large.

There could be a way to delay writing the file if multiple changes on it will be performed, performing all of them on one single object in memory, and then writing only once in the end.

fabiocarvalho777 avatar Nov 04 '17 16:11 fabiocarvalho777