bkkothari2255 opened a new pull request, #86: URL: https://github.com/apache/sling-org-apache-sling-models-impl/pull/86
Issue : SLING-12217 While SLING-12244 fixed the database side of these duplicate lookups, `AdapterImplementations.lookup()` was still hammering the CPU by re-evaluating search paths and querying the large `ConcurrentHashMap` hundreds of times per page render for the same exact resource type changes: - Request-scoped Cache: attach a cache directly to `ResourceResolver.getPropertyMap()` so it lives and dies with the HTTP request - IdentityHashMap: Used this to map the cache keys. This is critical to prevent Java from doing O(N) deep equality checks against the large map of registered Sling Models. - Remembering Not Found Results: We use a placeholder (Object.class) to remember when a resource type doesn't have a model. This lets us instantly abort future checks instead of endlessly re-walking the JCR tree looking for something that isn't there. Let me know what you think? -- 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]
