50510[TASK] Drastically reduce TS re-parsing in TemplatePaths
Commit message
Review
-
Code review CR +2
- Georg Ringer +2
- Anja Leichsenring +1
- Andreas Kienast +1
-
Verified V +2
- Georg Ringer +2
- Anja Leichsenring +1
- TYPO3com +1 CI
Files 1
Review log 3239
Show 1114 earlier messages
-
Claus Due uploaded patch set 1 11/05/16, 15:17
-
Claus Due commented on patch set 1 11/05/16, 15:17
Comparison call graph using a Flux environment in the backend: https://blackfire.io/profiles/compare/82cc1ee6-2f07-43f6-9e07-9c614b04e865...01ef391f-6dec-4527-b630-5308178ef17b/graph?settings%5Bdimension%5D=wt&settings%5Bdisplay%5D=landscape&settings%5BtabPane%5D=nodes&selected=&callname=main() -
TYPO3com voted on patch set 1 V +1 11/05/16, 15:21 Completed build in 04m 22s on Sat, 5 Nov, 04:21 PM Test Summary: 54839 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4619
-
Andreas Kienast commented on patch set 1 11/05/16, 15:34
Is this relevant for 7.6 as well? -
Anja Leichsenring updated the commit message in patch set 2 11/05/16, 15:36
-
Markus Klein commented on patch set 2 11/05/16, 15:37
Shall we use a dedicated cache from the CF, which is then set to TransientBackend? -
Anja Leichsenring commented on patch set 2 11/05/16, 15:38
TemplatePaths.php:124I would prefer to have the storing action and the return action in two lines. Took me some seconds to understand that this line does both. For the sake of readability, please? -
TYPO3com voted on patch set 2 V +1 11/05/16, 15:40 Completed build in 04m 12s on Sat, 5 Nov, 04:40 PM Test Summary: 54839 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4620
-
Claus Due uploaded patch set 3 11/05/16, 15:40
-
Claus Due commented on patch set 3 11/05/16, 15:41
Done! -
Claus Due commented on patch set 3 11/05/16, 15:44
> Shall we use a dedicated cache from the CF, which is then set to TransientBackend? I would not do that - the intention is not to cache as such, just to avoid recalling the same logic over and over with the same input. It would not play well with actual caches either (if someone thought to replace backend via CF) since it "caches" without any page ID. In other words: completely internal runtime "cache". -
TYPO3com voted on patch set 3 V +1 11/05/16, 15:45 Completed build in 05m 18s on Sat, 5 Nov, 04:45 PM Test Summary: 54839 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4621
-
Claus Due commented on patch set 3 11/05/16, 15:47
> Is this relevant for 7.6 as well? TemplatePaths was introduced on 8.0 and 7.6 does this very differently; I don't think the same mass calling is a problem on 7.6 - or at least not as big a problem. The whole thing is additionally expressed more on 8.0+ after so many more renderings have been fluidified :) -
Anja Leichsenring commented on patch set 4 11/05/16, 15:53
Published edit on patch set 3.
-
Anja Leichsenring commented on patch set 4 CR +1 V +1 11/05/16, 15:54
Renamed the variable to make it more obvious whats in there. Sorry for the nitpick, works fine as far as I tested. -
Claus Due commented on patch set 4 11/05/16, 15:55
No problem :) -
Christian Kuhn commented on patch set 4 11/05/16, 15:58
TemplatePaths.php:36would you consider putting that into runtime cache using cache manager? those static properties give headaches in tests, and they complicate a scope change later. -
TYPO3com voted on patch set 4 V +1 11/05/16, 15:59 Completed build in 05m 45s on Sat, 5 Nov, 04:59 PM Test Summary: 54839 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4623
-
Claus Due commented on patch set 4 11/05/16, 16:10
> would you consider putting that into runtime cache using cache manager? I would rather avoid that. I know the issues with testing, but argue that: * Using runtime cache causes even more framework load on DI (one per plugin, CType etc.) * The output is very static and is only called internally in TemplatePaths. The output would be the same in third-party implementations; unless they need it resolved another way in which case they override the method anyway. I think these side effects are a lot more excessive in this particular case (several thousand calls to the method). After all, we would be adding thousands of calls to has() / get(). -
Christian Kuhn commented on patch set 4 11/05/16, 16:21
well, that path to the CF is pretty slim: object manager is not involved, only makeInstance (especially quick with singletons). fetching through to he backend class and calling get/set is straight, too. calling this stuff basically means putting some function calls onto the cpu stack. there is nothing that is quicker than that. -
Claus Due uploaded patch set 5 11/05/16, 16:33
-
Claus Due commented on patch set 5 11/05/16, 16:35
Switched to runtime cache, put cache loading in utility function so it can be mocked, if this is required some day. Reduces the call stack regarding remoteDotsFromTS like it should, can't say for wall time (time being so stupidly relative). -
Markus Klein commented on patch set 5 11/05/16, 16:38
Claus, is the extKey as cache identifier really enough? The method depends on more class members, which might change in between successive calls to the function, right? -
TYPO3com voted on patch set 5 V +1 11/05/16, 16:38 Completed build in 05m 05s on Sat, 5 Nov, 05:38 PM Test Summary: 54839 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4624
-
Claus Due commented on patch set 5 11/05/16, 16:47
The cache key has "viewpaths_" as prefix since switching to runtime_cache, for that very reason :) -
Claus Due commented on patch set 5 11/05/16, 16:50
I misunderstood you: yes, the logic depends on one additional context information. The page UID, because it depends on the configurationmanager's TS output. So it should be safe as long as this is only in the runtime cache - because the page UID and TS does not change while rendering a page. -
Markus Klein commented on patch set 5 CR +1 11/05/16, 16:58
Alright, we are good to go then. Thank you. -
Claus Due uploaded patch set 6 11/05/16, 17:00
-
Claus Due commented on patch set 6 11/05/16, 17:01
Saved a call to has() - thanks to Christian. I think this one is ready! -
Anja Leichsenring voted on patch set 6 CR +1 V +1 11/05/16, 17:02
-
Markus Klein voted on patch set 6 CR +1 11/05/16, 17:02
-
Anja Leichsenring commented on patch set 6 11/05/16, 17:04
and now, being very bold, I request some before - after numbers :D Can you provide some profiling? -
TYPO3com voted on patch set 6 V +1 11/05/16, 17:05 Completed build in 04m 36s on Sat, 5 Nov, 06:05 PM Test Summary: 54839 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4625
-
Anja Leichsenring updated the commit message in patch set 7 11/05/16, 17:08
-
Anja Leichsenring voted on patch set 7 CR +1 V +1 11/05/16, 17:08
-
TYPO3com voted on patch set 7 V +1 11/05/16, 17:13 Completed build in 04m 23s on Sat, 5 Nov, 06:13 PM Test Summary: 54839 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4626
-
Andreas Kienast voted on patch set 7 CR +1 11/05/16, 17:23
-
Georg Ringer voted on patch set 7 CR +2 V +2 11/06/16, 05:47
-
Gerrit merged patch set 7 11/06/16, 05:47