Patent attributes
A method, computer system, and computer program product for generating an optimized managed runtime application is provided. Method invocation statistics for a managed runtime application are received. The managed runtime application comprises code defining a plurality of classes, each class including bytecode for one or more methods associated with the class. The method invocation statistics identify the methods invoked during at least one previous execution of the managed runtime application. An optimized version of the managed runtime application is generated based on the method invocation statistics. The managed runtime application is retrieved, and bytecode for at least one method of a class of the managed runtime application is selectively replaced with proxy code based on the method invocation statistics. The proxy code is configured for retrieving the replaced code.