You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@metamodel.apache.org by "Kasper Sørensen (JIRA)" <ji...@apache.org> on 2015/08/15 20:43:45 UTC

[jira] [Assigned] (METAMODEL-173) Effecient CSV writing/appending for non-file resources

     [ https://issues.apache.org/jira/browse/METAMODEL-173?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kasper Sørensen reassigned METAMODEL-173:
-----------------------------------------

    Assignee: Kasper Sørensen

> 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
>            Assignee: 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)