Hmm, i tried to incorporate the permission_p caching, but then there were a lot of errors in the log file concerning filters (tclop: invalid return code from filter proc). There are probably additional changes necessary that i overlooked.
But these changes would only affect the tcl procedures and quite often the problem is with db-queries that use db-procs to check permissions. The caching of permission_p will not speed up the db-procs.
The performance problem seems to affect the group file-storage as well.