Details
-
Bug
-
Resolution: Fixed
-
Major
-
5.1-milestone-2
-
Unknown
-
N/A
-
N/A
-
Description
The consequence is lowered performances.
For example we you call http://localhost:8080/xwiki/bin/view/Main/WebHome the folowing calls are made:
- XWiki.getXWiki()
- XWiki.getRequestWikiName()
- XWiki.findWikiServer()
- Query Manager call on the DB to locate a descriptor page
The problem is that when no descriptor is found (which happens on a default install), the code does:
this.virtualWikiMap.set(host, wikiName);
And since wikiName is null, the next time findWikiServer is called the following condition evaluate to true and the cycle repeats:
DocumentReference wikiName = this.virtualWikiMap.get(host); if (wikiName == null) { ...
The solution is to save the fact that there's no wiki descriptor for "localhost" and have some EventListener update that cache if a descriptor is added.
Attachments
Issue Links
- depends on
-
XWIKI-9520 Add support for extracting wikis using Wiki Descriptor in passed URLs using the new URL module
- Closed