That's what we're doing. We're opening them for a specific bit of work
and then closing them when done. The use case here is that we have this
tag library that interrogates links and determines if they're a web page
in the system. If they are it formats them a specific way. What this
means, though, is that when you build the header in the site you
effectively call this method hundreds of times. That's why I was
wondering about the overhead of opening all of these ResourceResolver
objects over an...
We're closing resources correctly. What jumped out at me when I looked
at our codebase in JProfiler was how long it took to even open a
resourceResolver, regardless of the fact that we're closing it
correctly. And we open hundreds of them per request. That's why I was
curious about the overhead of even opening one.
I inherited code for an application that uses resourceResolver instances
quite liberally. Notably this code has a custom tag library for
generating anchor tags. When called it takes the link and checks to see
if it’s a page in the AEM using a resourceResolver. In the case of the
navigation or footer it does this hundreds of times in total, per server
hit. We’re struggling with performance issues and I set JProfiler
against the application and that’s the only thing that jumps out.
Anything else to help troubleshoot this? I did everything you said
(which I believe comes from the article I originally cited). Here's what
I see for Brightcove Connector. Importing Bundlescom.ourcompany
(591)That's the end of the line on this scenario, right? And yet as a
test I removed Brightcove Connector from our codebase and the core
services no longer restart if I do that. What else can I do. One custom
bundle imports another custom bundle. Neither exports each other or a
Right. And this isn't what's happening with our setup. The only bundle
importing either of the custom bundles is that one of them imports the
other. No out of the box bundles import either custom bundle.