Claims
- 1. A method for transmitting methods to a client running a virtual machine, the methods contained in one or more classes, the method comprising:
recursively scanning through application code beginning at an application entrypoint to determine which methods may be called and the classes to which they correspond; storing identifiers corresponding to said methods which may be called, in a method usage map organized by classes; receiving a request for an application from a client; processing all application and library classes for the application specified by the request, removing unused methods from it as per said method usage map; and transmitting any remaining methods to the client.
- 2. The method of claim 1, wherein said recursively scanning includes:
finding all methods referenced in said application code; and finding all methods referenced in methods referenced in said application code.
- 3. The method of claim 1, wherein said storing includes storing said method usage map in a file on a server.
- 4. The method of claim 3, wherein each of the classes is stored on said server.
- 5. The method of claim 1, wherein said recursively scanning includes statically determining which methods of the classes may actually be used by the application.
- 6. The method of claim 1, wherein said recursively scanning includes handling method polymorphism.
- 7. A method for transmitting methods to a client running a virtual machine, the methods contained in one or more classes, the method comprising:
recursively scanning through application code beginning at an application entrypoint to determine which methods may be called and the classes to which they correspond; storing identifiers corresponding to said methods which may be called, in a method usage map organized by classes; receiving a request for a class from a client; determining which method usage map to use by examining said request; processing said class specified by the request, removing unused methods from it as per said method usage map; and transmitting any remaining methods to the client.
- 8. The method of claim 7, wherein said request for a class may be either a request for a main class or a request for an application class.
- 9. The method of claim 8, wherein if said request for a class is a request for a main class, said determining comprises using a method usage map corresponding to said main class.
- 10. The method of claim 9, wherein said method usage map corresponding to said main class shares the same name as said main class.
- 11. The method of claim 8, wherein if said request for a class is a request for an application class, said request also includes a main class name.
- 12. The method of claim 11, wherein if said request for a class is a request for an application class, said determining comprises using a method usage map corresponding to said main class name.
- 13. The method of claim 12, wherein said method usage map corresponding to said main class shares the same name as said main class.
- 14. The method of claim 7, wherein said recursively scanning includes:
finding all methods referenced in said application code; and finding all methods referenced in methods referenced in said application code.
- 15. The method of claim 7, wherein said storing includes storing said method usage map in a file on a server.
- 16. The method of claim 15, wherein each of the classes is stored on said server.
- 17. The method of claim 7, wherein said recursively scanning includes statically determining which methods of the classes may actually be used by the application.
- 18. The method of claim 7, wherein said recursively scanning includes handling method polymorphism.
- 19. A method for transmitting methods to a client running a virtual machine, the methods contained in one or more classes, the method comprising:
receiving a request for a class from a client; determining a method usage map to use by examining said request; processing said class specified by the request, removing unused methods from it as per said method usage map; and transmitting any remaining methods to the client.
- 20. A method for transmitting methods to a client running a virtual machine, the methods contained in one or more classes, the method comprising:
receiving a request for a class from a client; determining which method usage map to use by examining said request; processing said class specified by the request, removing unused methods from it as per said method usage map; and transmitting any remaining methods to the client.
- 21. The method of claim 20, wherein said request for a class may be either a request for a main class or a request for an application class.
- 22. The method of claim 21, wherein if said request for a class is a request for a main class, said determining comprises using a method usage map corresponding to said main class.
- 23. The method of claim 22, wherein said method usage map corresponding to said main class shares the same name as said main class.
- 24. The method of claim 21, wherein if said request for a class is a request for an application class, said request also includes a main class name.
- 25. The method of claim 24, wherein if said request for a class is a request for an application class, said determining comprises using a method usage map corresponding to said main class name.
- 26. The method of claim 25, wherein said method usage map corresponding to said main class shares the same name as said main class.
- 27. An apparatus for transmitting methods to a client running a virtual machine, the methods contained in one or more classes, the apparatus comprising:
an application code method recursive scanner; a method usage map generator coupled to said application code method recursive scanner; a memory; a method usage map storer coupled to said method usage map generator and to said memory; a client application request receiver; an application and library class processor coupled to said client application request receiver and to said memory; and a remaining method transmitter coupled to said application and library class processor.
- 28. An apparatus for transmitting methods to a client running a virtual machine, the methods contained in one or more classes, the apparatus comprising:
an application code method recursive scanner; a method usage map generator coupled to said application code method recursive scanner; a memory; a method usage map storer coupled to said method usage map generator and to said memory; a client class request receiver; a method usage map determiner coupled to said client class request receiver; an application and library class processor coupled to said method usage map determiner and to said memory; and a remaining method transmitter coupled to said application and library class processor.
- 29. An apparatus for transmitting methods to a client running a virtual machine, the methods contained in one or more classes, the apparatus comprising:
a memory; a method usage map storer coupled to said method usage map generator and to said memory; a client application request receiver; an application and library class processor coupled to said client application request receiver and to said memory; and a remaining method transmitter coupled to said application and library class processor.
- 30. An apparatus for transmitting methods to a client running a virtual machine, the methods contained in one or more classes, the apparatus comprising:
a memory; a method usage map storer coupled to said method usage map generator and to said memory; a client class request receiver; a method usage map determiner coupled to said client class request receiver; an application and library class processor coupled to said method usage map determiner and to said memory; and a remaining method transmitter coupled to said application and library class processor.
- 31. An apparatus for transmitting methods to a client running a virtual machine, the methods contained in one or more classes, the apparatus comprising:
means for recursively scanning through application code beginning at an application entrypoint to determine which methods may be called and the classes to which they correspond; means for storing identifiers corresponding to said methods which may be called, in a method usage map organized by classes; means for receiving a request for an application from a client; means for processing all application and library classes for the application specified by the request, removing unused methods from it as per said method usage map; and means for transmitting any remaining methods to the client.
- 32. The apparatus of claim 31, wherein said means for recursively scanning includes:
means for finding all methods referenced in said application code; and means for finding all methods referenced in methods referenced in said application code.
- 33. The apparatus of claim 31, wherein said means for storing includes means for storing said method usage map in a file on a server.
- 34. The apparatus of claim 33, wherein each of the classes is stored on said server.
- 35. The apparatus of claim 31, wherein said means for recursively scanning includes means for statically determining which methods of the classes may actually be used by the application.
- 36. The apparatus of claim 31, wherein said means for recursively scanning includes means for handling method polymorphism.
- 37. An apparatus for transmitting methods to a client running a virtual machine, the methods contained in one or more classes, the apparatus comprising:
means for recursively scanning through application code beginning at an application entrypoint to determine which methods may be called and the classes to which they correspond; means for storing identifiers corresponding to said methods which may be called in a method usage map organized by classes; means for receiving a request for a class from a client; means for determining which method usage map to use by examining said request; means for processing said class specified by the request, removing unused methods from it as per said method usage map; and means for transmitting any remaining methods to the client.
- 38. The apparatus of claim 38, wherein said request for a class may be either a request for a main class or a request for an application class.
- 39. The apparatus of claim 38, wherein if said request for a class is a request for a main class, said means for determining comprises means for using a method usage map corresponding to said main class.
- 40. The apparatus of claim 39, wherein said method usage map corresponding to said main class shares the same name as said main class.
- 41. The apparatus of claim 38, wherein if said request for a class is a request for an application class, said request also includes a main class name.
- 42. The apparatus of claim 41, wherein if said request for a class is a request for an application class, said means for determining comprises means for using a method usage map corresponding to said main class name.
- 43. The apparatus of claim 42, wherein said method usage map corresponding to said main class shares the same name as said main class.
- 44. The apparatus of claim 37, wherein said means for recursively scanning includes:
means for finding all methods referenced in said application code; and means for finding all methods referenced in methods referenced in said application code.
- 45. The apparatus of claim 37, wherein said means for storing includes means for storing said method usage map in a file on a server.
- 46. The apparatus of claim 45, wherein each of the classes is stored on said server.
- 47. The apparatus of claim 37, wherein said means for recursively scanning includes means for statically determining which methods of the classes may actually be used by the application.
- 48. The apparatus of claim 37, wherein said means for recursively scanning includes means for handling method polymorphism.
- 49. An apparatus for transmitting methods to a client running a virtual machine, the methods contained in one or more classes, the apparatus comprising:
means for receiving a request for a class from a client; means for determining a method usage map to use by examining said request; means for processing said class specified by the request, removing unused methods from it as per said method usage map; and means for transmitting any remaining methods to the client.
- 50. An apparatus for transmitting methods to a client running a virtual machine, the methods contained in one or more classes, the apparatus comprising:
means for receiving a request for a class from a client; means for determining which method usage map to use by examining said request; means for processing said class specified by the request, removing unused methods from it as per said method usage map; and means for transmitting any remaining methods to the client.
- 51. The apparatus of claim 50, wherein said request for a class may be either a request for a main class or a request for an application class.
- 52. The apparatus of claim 51, wherein if said request for a class is a request for a main class, said means for determining comprises means for using a method usage map corresponding to said main class.
- 53. The apparatus of claim 52, wherein said method usage map corresponding to said main class shares the same name as said main class.
- 54. The apparatus of claim 51, wherein if said request for a class is a request for an application class, said request also includes a main class name.
- 55. The apparatus of claim 54, wherein if said request for a class is a request for an application class, said means for determining comprises means for using a method usage map corresponding to said main class name.
- 56. The apparatus of claim 55, wherein said method usage map corresponding to said main class shares the same name as said main class.
- 57. A program storage device readable by a machine, tangibly embodying a program of instructions executable by the machine to perform a method for loading methods into a virtual machine, the methods contained in one or more classes, the method comprising:
recursively scanning through application code beginning at an application entrypoint to determine which methods may be called and the classes to which they correspond; storing identifiers corresponding to said methods which may be called, in a method usage map organized by classes; receiving a request for an application from a client; processing all application and library classes for the application specified by the request, removing unused methods from it as per said method usage map; and transmitting any remaining methods to the client.
- 58. A program storage device readable by a machine, tangibly embodying a program of instructions executable by the machine to perform a method for loading methods into a virtual machine, the methods contained in one or more classes, the method comprising:
recursively scanning through application code beginning at an application entrypoint to determine which methods may be called and the classes to which they correspond; storing identifiers corresponding to said methods which may be called in a method usage map organized by classes; receiving a request for a class from a client; determining which method usage map to use by examining said request; processing said class specified by the request, removing unused methods from it as per said method usage map; and transmitting any remaining methods to the client.
- 59. A program storage device readable by a machine, tangibly embodying a program of instructions executable by the machine to perform a method for loading methods into a virtual machine, the methods contained in one or more classes, the method comprising:
receiving a request for a class from a client; determining a method usage map to use by examining said request; processing said class specified by the request, removing unused methods from it as per said method usage map; and transmitting any remaining methods to the client.
CROSS-REFERENCE TO RELATED APPLICATION
[0001] The present application is a continuation-in-part of co-pending application Ser. No. 10/086,387, filed Feb. 28, 2002, by Mikhail Dmitriev, entitled “REDUCING THE MEMORY FOOTPRINT OF APPLICATIONS EXECUTED IN A VIRTUAL MACHINE”.
Continuation in Parts (1)
|
Number |
Date |
Country |
Parent |
10086387 |
Feb 2002 |
US |
Child |
10159919 |
May 2002 |
US |