
|
If you were logged in you would be able to see more operations.
|
|
If the correct namespace and localName are passed to a MemValueFactory these exact String Object should be used in the MemURI. Currently the process creates a StringBuffer->String->2xsubstring. In an example of two intern Strings passed in there is extra garbage memory and twice the permanent memory.
The method createURI(String,String) could be changed to the following:
char c = namespace.charAt(namespace.length() - 1);
if (c != '#' && c != '/' && c != ':')
return createURI(namespace + localName);
if (localName.indexOf('#') + localName.indexOf('/') + localName.indexOf(':') != -3)
return createURI(namespace + localName);
URI tempURI = new MemURI(namespace, localName);
MemURI memURI = _uriRegistry.get(tempURI);
if (memURI == null)
memURI = createMemURI(tempURI);
return memURI;
|
|
Issue fixed in revision 2435. Note that the suggested algorithm does not match the URI-splitting algorithm as specified for org.openrdf.model.URI. A correct implementation of the algorithm can be found in org.openrdf.model.ModelUtil.isCorrectURISplit(...).
|
|