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

Design for lazy loading #9

@robertvazan

Description

@robertvazan

API of this library is designed in such a way that it forces loading of a large number of classes even though only a few are actually used. This has perceptible and sometimes very serious performance impact.

Just executing CoreFactory.newWebPageBuilder() costs 1 second on a fast computer. I had to disable schema.org generation during development to get fast program restarts.

Initialization of the library takes 3-4 seconds on moderately fast VPS, but it can stretch out to 30-60 seconds when the server is under heavy load as is common when the server has to be restarted. I had to disable schema.org during the first minute or so after server restart. This is of course not ideal, because pages served during this time are incomplete.

It would be much better to have an API like WebPage.builder() that would only force loading of WebPage and its ancestor classes. This would be performant and actually more intuitive than the current API.

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