Page MenuHomePhabricator

Use lexeme-search limiting to optimize Z6830/Find lexemes for a Wikidata item
Closed, ResolvedPublic

Description

Description

When the work on T271776 has been completed, use the inlanguage keyword to optimize Z6830/Find lexemes for a Wikidata item (T383631). It will completely eliminate a fetch call to Wikidata action API wbgetentities (which in some cases retrieves > 200 lexemes), for each call to Z6830. This will be a coding change in fetchObject.js.

When T387235 has been completed, this optimization should also be applied there.

Desired behavior/Acceptance criteria (returned value, expected error, performance expectations, etc.)

  • Execution time for calls to Z6830 is expected to be cut in half, or better.

Completion checklist

Event Timeline

DSantamaria changed the task status from Open to In Progress.Mar 10 2025, 6:28 AM

Change #1126996 had a related patch set uploaded (by Jforrester; author: Jforrester):

[operations/deployment-charts@master] wikifunctions: Update orchestrator from 2025-03-05-140247 to 2025-03-11-234105

https://gerrit.wikimedia.org/r/1126996

Change #1126996 merged by jenkins-bot:

[operations/deployment-charts@master] wikifunctions: Update orchestrator from 2025-03-05-140247 to 2025-03-11-234105

https://gerrit.wikimedia.org/r/1126996

As expected, this optimization has yielded a significant speed-up. Previously calls to Z6830 were averaging around one second; now they are averaging around 200 ms. (This is from observing a handful of curl calls to the orchestrator API, from production deployment server.)