Skip to content

[HOLD for payment 2025-02-05] [$250] Optimize hover state management #55652

Description

@mountiny

Coming from here

BACKGROUND

The ActiveHoverable component manages hover states for interactive elements in our web interface. The current implementation is using multiple event listeners, including a global document-level mouseover listener, which is causing performance overhead, especially in views with many hoverable elements. For example, when hovering over chat messages, the CPU utilization can reach 100%.

PROBLEM

  1. Global mouseover event listener on document level is causing continuous event processing and being triggered on extremely frequently (on every mouse pixel move)
  2. Each hoverable instance adds its own document listener, multiplying the overhead
  3. High CPU usage during mouse movement across the page
  4. Redundant hover state checks and updates

SOLUTION

Optimize hover state management and CPU performance by:

  1. Removing the global document-level mouseover listener
  2. Using component-level mouse events only
  3. Implementing efficient state tracking with lastKnownHoverState
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021882410245975337736
  • Upwork Job ID: 1882410245975337736
  • Last Price Increase: 2025-01-23
  • Automatic offers:
    • brunovjk | Reviewer | 105822890
Issue OwnerCurrent Issue Owner: @johncschuster

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions