XWikiRightServiceImpl.listAllLevels uses a costly method for producing a constant result.
Indeed it splits a string and build the list of rights each time it is called.
This could be improved by generating a static list once for all.
See attached patch.
In the attached patch I have used a 1.4 compatible syntax but
jdk 1.5 allows us the slightly more elegant construct: