Skip to content

csharp: on a first index no graph is queryable until every other language's engine has compiled #1555

Closed

Description

@swapnilpaliwal-sd

On a first index of a repository written mostly in one language with a few files in others, nothing is queryable until every language's engine has compiled and solved. The main language's graph is finished early and then withheld. On a C# web application with a small ClientApp front end, the C# graph was written 131 s into the build and the first query could be answered at 5,304 s; a query issued in between blocks on the build lock. Measured on 0.1.3 at 0df257c.

Reproduction

WebApp/WebApp.csproj                         (Microsoft.NET.Sdk.Web, net8.0)
WebApp/Program.cs
WebApp/Controllers/OrdersController.cs       (calls IOrderService.Total)
WebApp/Services/OrderService.cs              (IOrderService, OrderService)
WebApp/ClientApp/package.json, tsconfig.json
WebApp/ClientApp/src/api.ts, main.ts, util.js

First axiomcode index with a fresh engine compile cache, as a new install has (no prebuilt engine package installed):

step ends at build.log
C# engine compiled and solved, out/csharp/graph.sqlite written 131 s Elapsed: 129s
TypeScript engine compiled and solved 635 s Elapsed: 502s
JavaScript engine compiled and solved 5,304 s Elapsed: 4668s
out/graph.sqlite pointer written, first query possible 5,304 s

Nearly all of each step is the Souffle compile of that language's rules. The machine was heavily loaded (load average 40 to 125 on 10 cores), so absolute times are inflated; the order and the gap are the finding: C# was ready at 2 % of the wall time, and three JavaScript files held the repository for the rest.

Control: axiomcode index --lang csharp on the same tree with a warm C# engine builds in 19 s and answers impact OrderService.Total in under 1 s.

Root cause

  • plugins/axiomcode/skills/axiomcode/scripts/axiomcode-build:67-70 adds every language with at least one file to LANGS, and :244 runs them all in one engine invocation (--language csharp,typescript,javascript).
  • bin/axiomcode:262-271 solves them one after another; each writes out/<lang>/graph.sqlite as it finishes, but the caller waits for the whole run to exit.
  • Only then does axiomcode-build:253-259 pick the main language's database, index it and move the out/graph.sqlite pointer.

Expected: the main language's graph is queryable when its own engine finishes.

Activity

  1. added
    bugSomething isn't working
    skillAgent-facing query skill (skills/axiomcode)
    on Sep 28, 2026
  2. added a commit that references this issue on Sep 28, 2026
  3. swapnilpaliwal-sd commented on Sep 28, 2026

    @swapnilpaliwal-sd
    ContributorAuthor

    Fixed by #1618.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcsharpC#skillAgent-facing query skill (skills/axiomcode)

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions