[ 
https://issues.apache.org/jira/browse/CLEREZZA-286?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12907177#action_12907177
 ] 

Manuel Innerhofer commented on CLEREZZA-286:
--------------------------------------------

When I add a triple containing a typedliteral of datatype base64 and remove it 
again, then the file remains on the harddisk. Maybe this is intentional?
Otherwise it seems to work now. 
Here some suggestions:
- you read the fileinputstream in parseLiteral() in ExternalizingMGraph and use 
it to instantiate a TypeLiteralImpl. To improve performance you could implement 
a TypedLiteral that does not read the fileinputstream until getLexicalForm() or 
getDataType() is called.
- You wrote "as the literal could be stored by its binary value it is akward 
transforming it to base64 on the storage layer and recreate the byte[] in the 
literal-factory".  If this problem would be solved, would it be possible to 
extend the TypeLiteral interface with a method returning an InputStream? A new 
TypedLiteral implementation could directly return the FileInputStream, which 
would be directly streamed back to a client (e.g. in 
org.apache.clerezza.platform.content.InfoDiscobitWriter), therefore preventing 
unnecessary memory usage to buffer the literal string.  


> Inserting lager literals takes too long
> ---------------------------------------
>
>                 Key: CLEREZZA-286
>                 URL: https://issues.apache.org/jira/browse/CLEREZZA-286
>             Project: Clerezza
>          Issue Type: Improvement
>            Reporter: Reto Bachmann-Gmür
>            Assignee: Reto Bachmann-Gmür
>
> As binary resources are stored as literal values in the graph inserting 
> literals of many MB is not a seldom usage scenario. Inserting such literals 
> however take very long and thus require a very long write-lock on the graph 
> (e.g. on my laptop 9 seconds when uploading a 40MB file with TDB and 3 second 
> with Sesame)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to