Skip to content

transform output deduplication #1703

@dg314

Description

@dg314

I tried migrating all of the types of my project (app.videogen.io) to Typia, and the build was still running after over 15 minutes. Many of the individual generated files were over 1MB. The problem is that we have many deeply nested types which include other complex types, and the transformer is redoing all of the work for each type without any deduplication.

For example, in the following case, both the bundle size and transformation time could be significantly reduced by reusing the generated functions in other generated functions.

type A = { a: 1 };
typia.createIs<A>();

type B = { a: A; b: 2 };
typia.createIs<B>();

type C = { a: A; b: B; c: 3 };
typia.createIs<C>();

...

type Z = {a: A; ...; y: Y; z: 26 };
typia.createIs<Z>();

Until this is resolved, typia is unusable for us.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions