Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.2.1, 1.2.2
-
None
Description
Hello,
I am benching Shiro, tahnks this method:
public void bench() {
final Subject subject = SecurityUtils.getSubject();
subject.login(new UsernamePasswordToken(LOGIN+i, PWD));
for (int ind = 0; ind < 100000; ind++)
subject.logout();
}
I see that I waste my time in the methode WildCardPermissionResolver which create a new instance of permission each time even if it is the same String in parameter.
I added a map which allows to cache WildcardPermission.
You can find in attachement the patch.
PS : the cache for authorisation is activated:
cacheManager = org.apache.shiro.cache.MemoryConstrainedCacheManager
securityManager.cacheManager = $cacheManager
Regards,
Thibault