Skip to:
Content

BuddyPress.org

Opened 9 months ago

Closed 4 months ago

Last modified 4 months ago

#9239 closed enhancement (fixed)

Sharing debounce functionality between components (PR #350)

Reported by: praveenkumar98's profile praveenkumar98 Owned by: espellcaste's profile espellcaste
Milestone: 15.0.0 Priority: normal
Severity: normal Version: 3.0.0
Component: Activity Keywords: debounce optimization needs-patch
Cc:

Description

This ticket refers to the discussion in PR 350 on GitHub, where we explored reusing debounce functionality across components. The initial focus was to optimize the code by sharing debounce functions to prevent redundant code. However, after feedback, we’ve decided to address the issue with the current implementation and ensure that the solution aligns with the project's architecture.

Relevant discussion points:

  • Complexity in reusing debounce functions across different parts of the project.
  • Please focus on simplifying the current approach according to feedback from the maintainers.

Testing steps and expected behavior will follow the changes made in the PR.

Change History (7)

This ticket was mentioned in PR #350 on buddypress/buddypress by Praveenkroot.


9 months ago
#1

  • Keywords has-patch added; needs-patch removed

Add debounce function to improve performance of @mentions remote filter

  • Integrated debounce function to throttle the frequency of remoteFilter calls.
  • Enhanced user experience by reducing the number of AJAX requests made during typing.
  • Updated the remoteFilter callback in mentions.js to use debounce.
  • Adjusted debounce delay to 300ms to balance responsiveness and performance.

This change aims to optimize the performance of the @mentions feature by minimizing unnecessary AJAX requests and improving overall responsiveness.

Trac ticket: https://buddypress.trac.wordpress.org/ticket/9239

#2 @imath
9 months ago

  • Keywords needs-patch added; has-patch removed
  • Milestone changed from 14.2.0 to 15.0.0
  • Version changed from 14.0.0 to 3.0.0

As last change about mentions.js was 3.0, it's not a 14.0 regression, so we'll have it fixed in 15.0.

#3 @espellcaste
8 months ago

  • Milestone changed from 15.0.0 to Awaiting Contributions

#4 @espellcaste
4 months ago

  • Component changed from Core to Activity
  • Milestone changed from Awaiting Contributions to 15.0.0

I think this is good to put into 15. :)

#5 @espellcaste
4 months ago

  • Owner set to espellcaste
  • Status changed from new to assigned

#6 @espellcaste
4 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 14098:

Activity: Add debounce to @mentions remote filter for improved performance.

This change aims to optimize the performance of the @mentions feature by minimizing unnecessary AJAX requests and improving overall responsiveness.

Props praveenkumar98.

Fixes #9239
Closes https://github.com/buddypress/buddypress/pull/350

renatonascalves commented on PR #350:


4 months ago
#7

Thanks @Praveenkroot 🤟🏽

Note: See TracTickets for help on using tickets.