Skip to content
This repository was archived by the owner on Jan 9, 2025. It is now read-only.
This repository was archived by the owner on Jan 9, 2025. It is now read-only.

is it safe to change defaultSlotSize of class BinaryStorer from 1024 to 10240 for performance? #703

@useryq8

Description

@useryq8

Environment Details

  • MicroStream Version: EclipseStore 1.1.0
  • JDK version: java21.0.1
  • OS: ubuntu 17
  • Used frameworks: springboot 2.7.8

Describe the bug

For more higher performance , I adjust the defaultSlotSize of class BinaryStorer from 1024 to 10240, org.eclipse.serializer.persistence.types.DefaultObjectRegistry minimumCapacity from 1 to 1024;

the eclipse store performance is higher then default,
Could I do like this and it is safe? do any one know why this change can increase the performance? Thank you very much.
@fh-ms @hg-ms

` public class Default
implements BinaryStorer, PersistenceStoreHandler, PersistenceLocalObjectIdRegistry
{
///////////////////////////////////////////////////////////////////////////
// constants //
//////////////

	private final static Logger logger = Logging.getLogger(BinaryStorer.class);
	
	
	protected static int defaultSlotSize()
	{
		// why permanently occupy additional memory with fields and instances for constant values?
		return 10240; // anything below 1024 doesn't pay of
	}`

public final class DefaultObjectRegistry implements PersistenceObjectRegistry public static DefaultObjectRegistry New(final float hashDensity) { return New(hashDensity, 10240); }
img_v3_028e_4cb0e424-60ef-4865-9afe-83b79f0357dg

image

To Reproduce

change the defaultSlotSize of class org.eclipse.serializer.persistence.binary.types.BinaryStorer from 1024 to 10240
change the minimumCapacity of class org.eclipse.serializer.persistence.types.DefaultObjectRegistry from 1 to 1024

Expected behavior

EclipseStore works well

I

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions