perf: async parallel cache initialization and remove deepcopy #6

Merged
barrettruth merged 1 commit from perf/async-init into main 2026-02-21 01:39:33 +00:00
barrettruth commented 2026-02-21 01:19:35 +00:00

Problem

First completion request blocked the UI with three sequential synchronous vim.system():wait() calls (man page, command names, command list), and every subsequent completion unnecessarily deep-copied the entire cache.

Closes #1

Solution

Run all three system calls concurrently via vim.system callbacks, merging results when all complete. Queue pending completion requests during loading. Return cached items directly instead of deep-copying.

## Problem First completion request blocked the UI with three sequential synchronous `vim.system():wait()` calls (man page, command names, command list), and every subsequent completion unnecessarily deep-copied the entire cache. Closes #1 ## Solution Run all three system calls concurrently via `vim.system` callbacks, merging results when all complete. Queue pending completion requests during loading. Return cached items directly instead of deep-copying.
Sign in to join this conversation.
No description provided.