Skip to content

Conversation

WizardOfDigits
Copy link
Contributor

@WizardOfDigits WizardOfDigits commented Feb 10, 2025

Description

What’s Added:

  • Added a new throttle function that limits the execution frequency of a given function.
  • The throttle function ensures that the provided function is called at most once within the specified time interval, improving performance in high-frequency event scenarios like scrolling or resizing.

Why This Addition:

This addition helps optimize performance by reducing the number of times event handlers are triggered during high-frequency events (e.g., scroll, resize), preventing unnecessary function calls and enhancing application performance.

Type of Change

  • ✨ New snippet
  • 🛠 Improvement to an existing snippet
  • 🐞 Bug fix
  • 📖 Documentation update
  • 🔧 Other (please describe):

Checklist

  • I have tested my code and verified it works as expected.
  • My code follows the style and contribution guidelines of this project.
  • Comments are added where necessary for clarity.
  • Documentation has been updated (if applicable).
  • There are no new warnings or errors from my changes.

Related Issues

Additional Context

Screenshots (Optional)

Click to view screenshots

@technoph1le technoph1le merged commit ad64947 into quicksnip-dev:main Mar 2, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants