Skip to content

[Tracking] Benchmark whether intermediate-aux-file caching is worth implementing #7

Description

@nicklambourne

Background

Tectonic, like classical LaTeX, runs multiple passes over a document
when it has cross-references, bibliography, or tables of contents.
Each pass reads a .aux file written by the previous pass.

Bazel currently caches the action output (the PDF + synctex). It
does not separately cache the intermediate .aux / .toc / .bbl
files between passes within a single action — Tectonic does that
internally in its temp dir.

The hypothesis is: for multi-pass documents with stable
bibliographies, we might be able to skip a pass by caching the
.aux file as a Bazel action output of an earlier action, and
feeding it back as an input to a later one.

Why this is probably never worth doing

  • Tectonic is fast. A full from-scratch compile of a thesis-sized
    document with biblatex + biber is ~3-5 seconds.
  • Bazel's action-output caching already kicks in for the
    no-source-change case: rebuild is ~0.05s, dominated by Bazel
    overhead.
  • The savings would only materialise when a user edits a
    non-bibliography source file in a way that changes the body but
    not the citations — a real but narrow case.

What "done" looks like

Either:

  1. A benchmark that demonstrates an actually-painful slowdown on a
    real document, with a sketch of a fix.
  2. A documented benchmark showing the savings are negligible, with
    this issue closed.

Source: DESIGN.md §5.5.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions