Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Checking performance of the latest 2.2.x code, I have found that both url and request path for default Resource instances are calculated over and over, but they never change. The reason is you cannot add resources to the path dynamically, which means all resources are static and does not change over application lifetime, so it is safe to store these two values in the cache and reuse them.
The only side effect detected is if two mappings (prefix and suffix) are used on the same application, the request path for a resource will not be according to the current mapping, but that's ok because one or the other should just the same.
This will improve performance a bit. The reason is before this patch, each Resource instace requires calculate the url and the request path. This is relevant for composite components, because each composite component requires create 1 Resource instance each time it is instantiated.