Forum Stats

  • 3,838,710 Users
  • 2,262,394 Discussions
  • 7,900,739 Comments

Discussions

Reduce desktop application memory

863708
863708 Member Posts: 25
edited Jun 23, 2011 9:40AM in Java Desktop Applications
I'm developing a windows desktop (standalone) application which runs as an endless loop.
Once the application starts, a database connection is created (java.sql.Connection) and is used all over the application.
The loop does the following operations:
* Call web services
* Execute Sql queries to read data from Database
* Write image (downloaded by one of the web services) to disk. (approximately ~80KB)

My application takes about 50 MB memory.
How can I reduce my application memory usage?

Answers

  • gimbal2
    gimbal2 Member Posts: 11,949 Gold Trophy
    edited Jun 23, 2011 9:40AM
    user10511764 wrote:
    My application takes about 50 MB memory.
    How can I reduce my application memory usage?
    Perhaps you can't. You're not running a native application here, you're running an application running in a high level virtual machine which also requires resources to do its bookkeeping and to ensure that everything runs smoothly and efficiently. When you create a .NET application you'll find that you get the same results.

    Besides, 50mb is nothing so why worry about it?


    edit:

    on top of that what you are seeing might not even be the memory your application is actually using, but the memory that the JVM claimed from the OS.
This discussion has been closed.