Memory Usage

This page gives some information about memory usage and performance and how to affect memory usage.

Introduction

There are a few reasons Chatty may use a considerable greater amount of memory compared to other IRC clients:

You can use the /appinfo command in Chatty to get some information about current memory usage. Note that these values can be somewhat different from what is shown in e.g. Task Manager.

Increase or reduce allocated memory

When you start a Java program there is some default maximum amount of memory it is allowed to use, which can vary on a case-by-case basis.

You can tell Java the maximum amount heap memory it can use by using the launch option -Xmx400M. In this example it allows a maximum heap of 400MB, which is recommended for good performance. You should normally never set it below 200MB or you may experience issues.

JAR Version

Create a shortcut (you may already have created one with the installer). When editing the shortcut change the target and add the launch option after Java but before the -jar part (you may have to add the javaw and -jar parts). It should end up looking similiar to:

javaw -Xmx400M -jar "D:\Chatty\Chatty.jar"

Standalone Version

The Chatty.exe of the Windows Standalone version will look for launch options in the file Chatty.cfg in the app folder, so you can add the -Xmx400M there, after [JVMOptions] (should already be there by default, so you can just change the number).

Running out of memory

If Java cannot clean up enough memory to make space for new data to be stored, an OutOfMemory exception will occur.

Short of analyzing a heap dump, basicially a full copy of the programs memory, it is hard to tell what exactly takes up the memory. Such analysis is often performed duing development and testing, but if an issue can not be reproduced then finding the exact cause can be difficult.

Reducing memory usage

The following settings can be adjusted to reduce memory usage:

Moderation - Clear message history of inactive users
Long running instances will accumulate more and more messages stored for display in the User Dialog. Setting this to a lower value can reduce memory usage.