This is a follow-up for
Part of this is postponed on
Now that we have all link generation centralized into one of two methods on the generator, we need to make it faster. The obvious way to do that is to cache requests to generateFromRoute() and generateFromPath(), so that we catch all of the work done by the outbound path processors.
For path alias lookups, we did that with a wrapping object. I think it makes sense to do the same here, with an object that has the same interfaces as the generator but simply forwards requests to it and then caches them. The pattern established by the path alias cache should work fine here. (I think it's now using the Destructable interface? If not, we should do that.)
We may also want to consider removing the cache wrapper from path alias lookups once we're done. We probably shouldn't do that in this patch, but a follow up would be to benchmark and see if it's still useful, and if not, get rid of it to avoid the complexity and extra cache storage.
|Task||Novice task?||Contributor instructions||Complete?|
|Update the issue summary||Instructions|
|Add automated tests||Instructions|
User interface changes
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 90,594 pass(es). View
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 88,039 pass(es). View