Patent ID: 7689979

Claim:
A method for enhancing performance of code at application launch time, the method comprising: identifying a location in which a global element is initialized in a sequence of code, the global element being accessible throughout the sequence of code; eliminating the global element at the location in the sequence of code; adding a new function to the sequence of code, the new function providing functionality associated with the global element; identifying at least one reference to the global element in the sequence of code; replacing the at least one reference to the global element with a respective reference to the new function; creating the new function in the sequence of code to support at least a portion of functionality previously provided by the eliminated global element; wherein identifying the at least one reference to the global element in the sequence of code includes identifying a given function in the sequence of code, the given function referencing the global element being eliminated from the location; and wherein replacing the at least one reference to the global element with a respective reference to the new function includes: eliminating a reference in the given function, the reference in the given function referring to the global element being eliminated from the location; and in place of the reference being eliminated from the given function, adding a reference to the new function, the reference to the new function enabling the given function to obtain a data value associated with the global element from the new function instead of the global element in the location.