Project

General

Profile

Actions

Feature #44194

closed

Cache user mention autocomplete responses to reduce redundant requests

Added by Go MAEDA 24 days ago. Updated 19 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Performance
Target version:
Resolution:
Fixed

Description

This patch improves user mention autocomplete by reusing recent autocomplete responses on the client side. It reduces unnecessary requests to the server, particularly when an autocomplete query has already been shown to have no matches.

Currently, when a user types several characters after "@", Redmine sends consecutive requests to the server to fetch users for the autocomplete suggestions. In environments with many users, each request may take several seconds to query the database. When many requests are sent in quick succession, this can increase server load.

This patch keeps the most recent autocomplete response in a small client-side cache. If the cached response is empty and the current query extends the cached query, the cached empty response is reused without sending another request. For example, if a request for "@jan" returned no matches, subsequent queries such as "@jane" and "@janet" are handled entirely on the client side because no matches can exist for those queries when none exist for "@jan". The cache is also reused when the same query is evaluated again.


Files

Actions #1

Updated by Go MAEDA 22 days ago

  • Target version set to 7.0.0

Setting the target version to 7.0.0.

Actions #2

Updated by Go MAEDA 19 days ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch in r24807.

Actions

Also available in: Atom PDF