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

fix: Small optimizations for merge code #1694

Merged
merged 1 commit into from
Feb 12, 2024

Conversation

adityapk00
Copy link
Contributor

@adityapk00 adityapk00 commented Feb 12, 2024

  1. Don't create dup Buffer objects
  2. Don't recompute tsHash

Motivation

Small optimizations after profiling

Merge Checklist

Choose all relevant options below by adding an x now or at any time before submitting for review


PR-Codex overview

This PR focuses on small optimizations for the merge code.

Detailed summary

  • Added cloneMessage function in messageDataBytes.test.ts
  • Imported makeTsHash function in store.test.ts
  • Optimized code in onChainEvent.ts and store.ts

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

1. Don't create dup Buffer objects
2. Don't recompute tsHash
@adityapk00 adityapk00 added the t-perf Improve performance label Feb 12, 2024
Copy link

changeset-bot bot commented Feb 12, 2024

🦋 Changeset detected

Latest commit: aa1ee33

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

This PR includes changesets to release 1 package
Name Type
@farcaster/hubble Patch

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

Copy link

vercel bot commented Feb 12, 2024

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

Name Status Preview Comments Updated (UTC)
hub-monorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 12, 2024 3:21pm

Copy link

codecov bot commented Feb 12, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (330ce83) 73.98% compared to head (aa1ee33) 74.09%.

Files Patch % Lines
apps/hubble/src/storage/stores/store.ts 83.33% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1694      +/-   ##
==========================================
+ Coverage   73.98%   74.09%   +0.11%     
==========================================
  Files          99       99              
  Lines        9263     9257       -6     
  Branches     2082     2079       -3     
==========================================
+ Hits         6853     6859       +6     
+ Misses       2289     2277      -12     
  Partials      121      121              

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

@adityapk00 adityapk00 merged commit 8e928ce into farcasterxyz:main Feb 12, 2024
10 checks passed
@adityapk00 adityapk00 deleted the optbuff branch February 12, 2024 22:44
dtbuchholz pushed a commit to dtbuchholz/hub-monorepo that referenced this pull request Feb 13, 2024
1. Don't create dup Buffer objects
2. Don't recompute tsHash
dtbuchholz pushed a commit to dtbuchholz/hub-monorepo that referenced this pull request Feb 13, 2024
1. Don't create dup Buffer objects
2. Don't recompute tsHash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t-perf Improve performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant