lance-format/lance

refactor: use LazyLock to initialize Field and Schema once

オープン

#8,244 opened on 2026/08/04

 (2 件のコメント) (0 件のリアクション) (0 人の担当者)Rust (695 件のフォーク)github user discovery
good first issue

Repository metrics

Stars
 (6,582 個のスター)
PR merge metrics
 (平均マージ 6d 1h) (30d で 219 merged PRs)

説明

In many places we output the same set of fields and/or schema per method call, or even per batch. This can be made cheaper if we initialize them once via a LazyLock and wrapping in an Arc.

Here's an example where we construct a schema per query:

https://github.com/lance-format/lance/blob/11eeb29161a2ac2763ff8cc6aa1fde8eb4592291/rust/lance-index/src/scalar/inverted/index.rs#L8107-L8116

コントリビューターガイド