java.lang.ClassLoader#loadClass() API is used by 3rd party libraries, JDBC Drivers, frameworks, and application servers to load a java class into the memory. Application developers don’t use this API frequently. However when they use the APIs such as ‘java.lang.Class.forName()’ or ‘org.springframework.util.ClassUtils.forName()’, they internally call this ‘java.lang.ClassLoader#loadClass()’ API.
Frequent usage of this API amongst different threads at runtime can slow down your application performance. Sometimes it can even make the entire application unresponsive. In this post let’s understand this API a little bit more and its performance impact.