Skip to content

fix: ensure that types are always resolved #2068

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
May 14, 2025

Conversation

mkruskal-google
Copy link
Contributor

@mkruskal-google mkruskal-google commented May 8, 2025

Now that resolveAll has been optimized, go back to ensuring that it's been called on every load. This is necessary to guarantee correctness of feature helpers, not just for feature resolution. Caching should make duplicate calls extremely cheap.

Just to be safe, this also does a second round of optimizations to lookup. For a large test proto, the time to run resolveAll has been cut in half, in addition to the ~30x wins from the previous PR. This also increases caching a bit to reduce costs of noop resolveAll calls, using the same namespace-based caching strategy as for feature resolution

@mkruskal-google mkruskal-google requested a review from sofisl May 8, 2025 23:18
@sofisl sofisl merged commit 4b51cb2 into protobufjs:master May 14, 2025
6 checks passed
sofisl added a commit that referenced this pull request May 14, 2025
@github-actions github-actions bot mentioned this pull request May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants