A method for rendering an application, comprising: retrieving an application script file comprising a plurality of scripts corresponding to a plurality of functions of the application; decomposing the application script file into a first script file and a second script file, wherein decomposing the application script file comprises: determining at least one function of the plurality of functions for deferred rendering from an initial rendering; creating the first script file by removing, from the application script file, at least one script corresponding to the determined at least one function for deferred rendering from the initial rendering, and creating the second script file comprising the removed at least one script; executing scripts in the first script file to provide the initial rendering of the application; and executing the removed at least one script in the second script file to patch on the fly the initial rendering of the application and to include the at least one function deferred from the initial rendering; characterized in that the at least one function of the plurality of functions for deferred rendering from an initial rendering is determined by performing (206, 300) static analysis of the plurality of functions, wherein the static analysis comprises determining one or more entry points of the application; determining a first set of functions invokable from the one or more entry points; determining a second set of functions invokable from the first set of functions to a transitive closure; and determining the at least one function for the deferred rendering as a function of the plurality of functions of the application which is neither an entry point nor in the first or second set of functions. retrieving an application script file comprising a plurality of scripts corresponding to a plurality of functions of the application; decomposing the application script file into a first script file and a second script file, wherein decomposing the application script file comprises: determining at least one function of the plurality of functions for deferred rendering from an initial rendering; creating the first script file by removing, from the application script file, at least one script corresponding to the determined at least one function for deferred rendering from the initial rendering, and creating the second script file comprising the removed at least one script; determining at least one function of the plurality of functions for deferred rendering from an initial rendering; creating the first script file by removing, from the application script file, at least one script corresponding to the determined at least one function for deferred rendering from the initial rendering, and creating the second script file comprising the removed at least one script; executing scripts in the first script file to provide the initial rendering of the application; and executing the removed at least one script in the second script file to patch on the fly the initial rendering of the application and to include the at least one function deferred from the initial rendering; characterized in that the at least one function of the plurality of functions for deferred rendering from an initial rendering is determined by performing (206, 300) static analysis of the plurality of functions, wherein the static analysis comprises determining one or more entry points of the application; determining a first set of functions invokable from the one or more entry points; determining a second set of functions invokable from the first set of functions to a transitive closure; and determining the at least one function for the deferred rendering as a function of the plurality of functions of the application which is neither an entry point nor in the first or second set of functions. determining one or more entry points of the application; determining a first set of functions invokable from the one or more entry points; determining a second set of functions invokable from the first set of functions to a transitive closure; and determining the at least one function for the deferred rendering as a function of the plurality of functions of the application which is neither an entry point nor in the first or second set of functions.