Skip to content

feat: speed up object parsing - #980

Merged
fortmarek merged 1 commit into
tuist:mainfrom
karlpuusepp:feature/faster-parse
Oct 6, 2025
Merged

feat: speed up object parsing#980
fortmarek merged 1 commit into
tuist:mainfrom
karlpuusepp:feature/faster-parse

Conversation

@karlpuusepp

Copy link
Copy Markdown
Contributor

PBXObject.isa can be quite expensive in a hot loop, as it internally calls Mirror to describe the type. Parsing large projects can be considerably faster by inlining the type names as raw strings.

As an example I measured our own project decoding time go from ~700ms to ~550ms with this change.

`PBXObject.isa` can be quite expensive in a hot loop, as it internally
calls `Mirror` to describe the type. Parsing large projects can be
considerably faster by inlining the type name as a raw string.
@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Oct 6, 2025
@fortmarek fortmarek changed the title Speed up object parsing feat: speed up object parsing Oct 6, 2025

@fortmarek fortmarek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks!

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Oct 6, 2025
@fortmarek
fortmarek merged commit b274dc1 into tuist:main Oct 6, 2025
5 of 7 checks passed
@karlpuusepp
karlpuusepp deleted the feature/faster-parse branch October 6, 2025 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants