Kasper Sørensen created METAMODEL-173:
-----------------------------------------
Summary: Effecient CSV writing/appending for non-file resources
Key: METAMODEL-173
URL: https://issues.apache.org/jira/browse/METAMODEL-173
Project: Apache MetaModel
Issue Type: Bug
Reporter: Kasper Sørensen
See https://github.com/apache/metamodel/pull/36
In CsvUpdateCallback line 91-100 we have a file-specific optimization that
keeps open an output stream and appends to that stream for the duration of many
CSV insert operations. On other Resource implementations we use the .append
call. But the .append call can be pretty expensive, so it is very ineffecient
and sometimes may even provoke application errors.
Instead we should add to the Resource interface a write() and an append()
method that returns OutputStream. With those methods it becomes possible to
allow the application more managed control over what is being written. Although
I prefer the functional style of the current write(Action) and append(Action)
methods, it seems that in practice we also need the more OO-oriented way for
writing to Resources.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)