pat-lego commented on code in PR #411:
URL:
https://github.com/apache/jackrabbit-filevault/pull/411#discussion_r2729375756
##########
vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/AggregateImpl.java:
##########
@@ -635,6 +647,9 @@ private void loadNamespaces() {
loadNamespaces(prefixes, "", getNode());
namespacePrefixes = prefixes.toArray(new
String[prefixes.size()]);
+ // Cache the discovered prefixes for this aggregate path
+ mgr.cacheAggregatePrefixes(path, namespacePrefixes);
Review Comment:
added bounded lru cache
##########
vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/AggregateImpl.java:
##########
@@ -623,6 +627,14 @@ private void addNamespacePath(Set<String> prefixes, String
path) throws Reposito
private void loadNamespaces() {
if (namespacePrefixes == null) {
+ // Check if this aggregate's namespaces are already cached
+ String[] cachedPrefixes = mgr.getCachedAggregatePrefixes(path);
+ if (cachedPrefixes != null) {
+ log.debug("Using cached namespace prefixes for '{}': {}",
path, cachedPrefixes);
Review Comment:
added a test
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]