You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by th...@apache.org on 2013/10/02 15:58:06 UTC
svn commit: r1528475 -
/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/ReadOnlyNamespaceRegistry.java
Author: thomasm
Date: Wed Oct 2 13:58:06 2013
New Revision: 1528475
URL: http://svn.apache.org/r1528475
Log:
OAK-125 : Improved namespace registry - slightly faster getURIs call by not sorting the list
Modified:
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/ReadOnlyNamespaceRegistry.java
Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/ReadOnlyNamespaceRegistry.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/ReadOnlyNamespaceRegistry.java?rev=1528475&r1=1528474&r2=1528475&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/ReadOnlyNamespaceRegistry.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/ReadOnlyNamespaceRegistry.java Wed Oct 2 13:58:06 2013
@@ -81,7 +81,6 @@ public abstract class ReadOnlyNamespaceR
Tree root = getReadTree();
Map<String, String> map = Namespaces.getNamespaceMap(root);
String[] uris = map.values().toArray(new String[map.size()]);
- Arrays.sort(uris);
return uris;
} catch (RuntimeException e) {
throw new RepositoryException(
Re: svn commit: r1528475 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/ReadOnlyNamespaceRegistry.java
Posted by Jukka Zitting <ju...@gmail.com>.
Hi,
On Wed, Oct 2, 2013 at 9:58 AM, <th...@apache.org> wrote:
> OAK-125 : Improved namespace registry - slightly faster getURIs call by not sorting the list
This can cause subtle issues for clients (including IIRC some of our
test cases) that assume a stable ordering of the return value. Clients
generally shouldn't rely on something like that, but it's an easy
thing to miss and a common source of problems, so I'd rather keep the
explicit ordering especially as I don't think its the key performance
bottleneck here.
BR,
Jukka Zitting