1. A computer-implemented method for optimizing memory usage in a virtual machine having a memory heap, comprising: scanning the memory heap at the end of a start-up process of the virtual machine to identify duplicate strings associated with the virtual machine; storing the identified duplicate strings in a string cache file; and determining whether a string created by the virtual machine during the start-up process is already in the string cache file.