Skip to content

Conversation

@FrederikBolding
Copy link
Member

@FrederikBolding FrederikBolding commented Apr 24, 2025

Previously we were validating that responses were JSON, but we already do that elsewhere and are guaranteed for the responses to be valid by the time we get to isValidResponse. Additionally, we don't need an entirely byte accurate length for the response, if the Snap goes beyond the limit they simply won't receive a response from the Snap.

@FrederikBolding FrederikBolding marked this pull request as ready for review April 25, 2025 08:00
@FrederikBolding FrederikBolding requested a review from a team as a code owner April 25, 2025 08:00
@FrederikBolding FrederikBolding changed the title perf: Reduce unnecesary JSON validation on responses perf: Reduce unnecessary validation on responses Apr 25, 2025
@codecov
Copy link

codecov bot commented Apr 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.03%. Comparing base (2933de0) to head (e7257ee).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3350      +/-   ##
==========================================
- Coverage   98.03%   98.03%   -0.01%     
==========================================
  Files         402      402              
  Lines       11110    11109       -1     
  Branches     1754     1754              
==========================================
- Hits        10892    10891       -1     
  Misses        218      218              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

export * from './handlers/exports';
export * from './handlers/types';
export * from './iframe';
export * from './json';
Copy link
Member

Choose a reason for hiding this comment

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

This won't be necessary anymore after #3322 😄

@FrederikBolding FrederikBolding added this pull request to the merge queue Apr 25, 2025
Merged via the queue into main with commit 5990071 Apr 25, 2025
169 checks passed
@FrederikBolding FrederikBolding deleted the fb/dont-validate-json-for-response-values branch April 25, 2025 10:51
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.

3 participants