Skip to content

perf: do 'lazy' comparison in 'checkIfCacheDataOutdated'#855

Merged
jbroma merged 2 commits intocallstack:mainfrom
borisyankov:perf-check-cache-outdated
Jan 9, 2025
Merged

perf: do 'lazy' comparison in 'checkIfCacheDataOutdated'#855
jbroma merged 2 commits intocallstack:mainfrom
borisyankov:perf-check-cache-outdated

Conversation

@borisyankov
Copy link
Contributor

Simplifies comparison with cached data. Also does not 'precompute' it before doing the comparison, so expression terminates on first difference.

Summary

Not sure if it is a real problem as the code might be called infrequently. I was just bugged by the eager version.

Test plan

Simplifies comparison with cached data. Also does not 'precompute'
it before doing the comparison, so expression terminates on first difference.
@changeset-bot
Copy link

changeset-bot bot commented Jan 8, 2025

🦋 Changeset detected

Latest commit: 35aa7ce

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@callstack/repack Major
@callstack/repack-plugin-reanimated Major
@callstack/repack-dev-server Major
@callstack/repack-init Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Jan 8, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
repack-website ⬜️ Ignored (Inspect) Visit Preview Jan 8, 2025 10:47pm

Copy link
Member

@jbroma jbroma left a comment

Choose a reason for hiding this comment

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

subtle but an improvement nonetheless, thanks!

please add changeset to this PR so we can merge this

@borisyankov
Copy link
Contributor Author

Changeset added!

Copy link
Member

@jbroma jbroma left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

@jbroma jbroma merged commit 6421e0b into callstack:main Jan 9, 2025
4 checks passed
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