[MGNLETK-62] multisite detection: implement a rule based algorithm to make the outcome more predictable. Created: 23/Aug/11 Updated: 05/Mar/12 Resolved: 23/Aug/11 |
|
| Status: | Closed |
| Project: | Extended Templating Kit (closed) |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.4.3 |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Philipp Bärfuss | Assignee: | Philipp Bärfuss |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||
| Template: |
|
||||||||||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||||||||||
| Date of First Response: | |||||||||||||||||||||||||
| Description |
|
While trying to fix some multi site related issues, I decided to rewrite the code to make it more readable and predictable.
|
| Comments |
| Comment by Stefan Baur [ 21/Sep/11 ] |
|
Hi Philipp We just tried to find the place, where those matchers /rule stes are located but didnt find them. Can you give us a hint, how we can make use of this improvement? |
| Comment by Rico Jansen [ 01/Mar/12 ] |
|
After we upgraded to ETK 1.4.4 we have performance issues, mainly in Admincentral website tree. We do have a lot of site definitions (40+), so it has to iterate a lot of data. |
| Comment by Jan Haderka [ 01/Mar/12 ] |
|
Hi Rico, thx for the info, is the method invocation the issue or is single invocation ok, but it gets called multiple times? Would it be possible to attach profiling data? Or at least average execution time for the method, number of executions during tree rendering and stacktrace showing where the invocations come from? Thx, |
| Comment by Rico Jansen [ 01/Mar/12 ] |
|
It looks like it gets called quite a lot, at least in the debugger it looks like it. |
| Comment by Rico Jansen [ 01/Mar/12 ] |
|
It seems it is caused some where else because getAssignedSite is called insanely often: Calls are mainly : A short analysis: |
| Comment by Rico Jansen [ 02/Mar/12 ] |
|
I have traced the issue back to SimpleUrlPattern in the Magnolia core, this has been changed I have implemented a simple LRU cache on the call, it keys on domain+uri. This has given us a big Installed on a public node, this also shows quite a lot of calls winding up in the cache, not as much Attached are the diffs to the code of 1.4.4 |
| Comment by Jan Haderka [ 02/Mar/12 ] |
|
Excellent. Thanks a lot Rico. |
| Comment by Rico Jansen [ 02/Mar/12 ] |
|
You're welcome, |
| Comment by Boris Kraft [ 02/Mar/12 ] |
|
shouldn't this issue be reopened given the new evidence? Or new issue be created? |
| Comment by Rico Jansen [ 02/Mar/12 ] |
|
Well technically this issue has been resolved. It is more that the performance suffers from the combination of this issue and issue: http://jira.magnolia-cms.com/browse/MAGNOLIA-3915 I have made issue : http://jira.magnolia-cms.com/browse/MGNLETK-72 which references those two. |
| Comment by Rico Jansen [ 05/Mar/12 ] |
|
It seems there is a small bug in the diff I posted, in the setSize call I refrain to wrap the LRUMap BTW The code is working nicely in production here. |