Skip to content

Tweak headers to make compilation faster #156

Closed
@barbieri

Description

@barbieri

Hi @wravery, it's me again :-) In order to avoid large PR being dropped, I'm opening this issue to get your feeling:

Currently the separate will use a single huge header full of templates that makes the compilation of large schemas painful slow. Example:

but most (all?) of them are not needed. AppointmentConnection, for instance, uses https://github.com/microsoft/cppgraphqlgen/blob/main/samples/separate/AppointmentEdgeObject.h but it seems the AppointmentEdge is handled as shared pointer and no direct member access is done.

I didn't try to change any files yet, but I wonder if we could avoid such full types and replace them with forward declarations whenever possible.

Also, as we're a generator and we know the dependencies, we could emit just the forward declarations for the types used in that file, reducing the compilation time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions