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

Batch cached execs fetches and deletions #966

Merged
merged 2 commits into from
Dec 17, 2024

Conversation

hernandoagf
Copy link
Collaborator

What does this PR do?

  • Replace the use of redis.keys() for redis.scan() which is optimized for production
  • Batch exec proposals scans to 100 at a time
  • Batch exec proposals deletions so they are deleted in groups of 100 instead of deleting them one by one

Copy link

vercel bot commented Dec 6, 2024

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

Name Status Preview Comments Updated (UTC)
governance-portal-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 6, 2024 7:58pm

Copy link

what-the-diff bot commented Dec 6, 2024

PR Summary

  • Optimized Animation Loading Process
    The method of incorporating the 'lottie-web' animation has been updated in the 'TxIndicators.tsx' and 'MobileVoteSheet.tsx' components. The library is now loaded dynamically, only when needed, which enhances the overall performance. We have also added logic to erase the animation instance once the component is no longer required.

  • Boosted Efficiency of Cache Deletion for Proposals
    The 'cacheDel' function within 'cache.ts' has been revised. Instead of fetching all data simultaneously, a 'SCAN' operation has been introduced to delete multiple proposal cache keys in batches—a much efficient approach.

  • Bettered Cache Information Retrieval process
    The 'getCacheInfo' function now utilizes the 'SCAN' procedure instead of 'keys' to locate proposal cache keys. This change has resulted in better memory usage and increased performance.

b-pmcg
b-pmcg previously approved these changes Dec 6, 2024
Copy link
Collaborator

@b-pmcg b-pmcg left a comment

Choose a reason for hiding this comment

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

nice work

@hernandoagf hernandoagf merged commit 5574da5 into develop Dec 17, 2024
10 of 11 checks passed
@hernandoagf hernandoagf deleted the batch-cached-execs-fetch branch December 17, 2024 17:59
hernandoagf added a commit that referenced this pull request Jan 23, 2025
* Batch cached execs fetches and deletions

* Dynamically import lottie

Co-authored-by: Tyler Sorensen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants