Skip to content
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

Add fast path for validating non-required undefined fields #2452

Merged
merged 2 commits into from
Apr 29, 2024

Conversation

gaearon
Copy link
Contributor

@gaearon gaearon commented Apr 27, 2024

Creating a thousand error objects (as observed in this post) is not good. Let's not do that.

The costs are shown with 6x throttling but can be higher on lower-end Android.

Before

Screenshot 2024-04-27 at 07 02 55 Screenshot 2024-04-27 at 07 04 58

After

Screenshot 2024-04-27 at 07 06 16

@gaearon gaearon requested a review from devinivy April 27, 2024 06:10
@gaearon

This comment was marked as resolved.

Copy link
Collaborator

@pfrazee pfrazee left a comment

Choose a reason for hiding this comment

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

At a glance this seems fine to me

@gaearon gaearon merged commit 6cd572c into main Apr 29, 2024
10 checks passed
@gaearon gaearon deleted the gaearon-fast-path-undefined branch April 29, 2024 19:43
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