Open Bug 2009363 Opened 1 day ago Updated 1 day ago

Improve identifier search performance

Categories

(Webtools :: Searchfox, task)

task

Tracking

(Not tracked)

People

(Reporter: nicolas.guichard, Assigned: nicolas.guichard)

References

Details

While looking for test queries for 1794004, I found a query in the logs that takes a significant amount of time in identifier_search: searching for "MOZ_":

2026-01-09 10:28:19.711493/pid=38457 - request(handled by 38458) /firefox-main/search?q=MOZ_&path=&case=false&regexp=false
2026-01-09 10:28:19.713360/pid=38458 - QUERY line: "MOZ_", fold_case: true, 
2026-01-09 10:28:19.740916/pid=38458 -   codesearch result with 4006 line matches across 63 paths - 0.027674 : re2_time: 1, git_time: 42, exit_reason: MATCH_LIMIT, total_time: 7, 
2026-01-09 10:28:19.757116/pid=38458 -   search_files "MOZ_" - 0.016029
2026-01-09 10:28:25.691964/pid=38458 -   identifier_search "MOZ_" - 5.934788
2026-01-09 10:28:26.712158/pid=38458 - WORK LIMIT HIT
2026-01-09 10:28:26.718721/pid=38458 -   search.get() - 1.026377
2026-01-09 10:28:27.046444/pid=38457 - finish pid 38458 - 7.334631

The identifier lookup itself seems fast enough, it's the following loop that does crossref lookups and demangling for every hit that makes this query slow.

You need to log in before you can comment on or make changes to this bug.