When running profiler against a Nuxeo 5.7-SNAPSHOT, I see that org.nuxeo.theme.jsf.facelets.NXThemesFaceletFactory.needsToBeRefreshed is called several times (100+) per page and take a lot of time (20%+).
The processing should be fast when Dev mode is activated, but in "normal" mode, this seems to make calls that may be slower ...
This may be a artefact of the profiling, but it is probably worth checking :
- run bench with normal code
- run bench with a patched needsToBeRefreshed that always returns false