Does implementing the Java Security Manager result in decreased performance?
+4
A:
That depends entirely on the details of the implementation, and on the application.
It's certainly possible to implement a Security Manager that takes a long time to check certain permissions and an application that requires these premissions to be checked very frequently, resulting in horrible performance.
But typically, checking permissions does not happen often enough to cause significant performance decreases.
Michael Borgwardt
2010-09-07 06:55:41
Thank you very much for the answer! Also I have one more question: Does the security manager check only the potentially harmful APIs like System.exit() or does it check all the APIs like System.out.println() ?
instantsetsuna
2010-09-07 06:58:41
@instantsetsuna: The security manager is called explicitly by specific "potentially unsafe" API calls, i.e. it does not check every single method call. You can add security checks in your own code as well.
Michael Borgwardt
2010-09-07 07:17:49
Thanks for the clarification! :)
instantsetsuna
2010-09-07 08:03:22