Skip to content

Feature request: Lazyload bean object ... Eager Singletons vs Lazy Singletons #165

@Travisnv

Description

@Travisnv

Hi @rbygrave, I see generated code eagerly create object when we build BeanScope. Can we make the process a bit more memory friendly by only construct beans beforehand if we desire so? Otherwise, the beans are created when we call scope.get().

Of course, we need configuration for that during build scope, something like:

BeanScope beanScope = BeanScope.newBuilder()...(false).build();

SomeBean bean = beanScope.get(SomeBean.class);
=> this bean is created when we explicitly call by scope object.

Thanks and Regards,
Travis

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