Print
Memory Consumption

The memory used by your objects will be the same as without Prevayler. Prevayler itself does not add any memory overhead to your object graph.

You can find out the memory footprint of your data by writing a standalone test program that allocates a large number of instances of your class(es). By measuring the difference in JVM heap used you will find out the footprint of your objects. Here is an article on this topic on JavaWorld.

The above does not mean that Prevayler does not need extra memory above the size of your objects. It only needs it temporarily when creating and loading snapshots. This amount greatly depends on the serialization method used by

the SnapshotManager - Java Serialization or XML Serialization.

If you write your own SnapshotManager that simply writes your objects to a file in text format, you can eliminate the need for extra memory required by Java Serialization or XML Serialization used by Prevayler.

Powered by Atlassian Confluence