Skip to content

[enhancement] Using boltdb's Batch() when updating multiple indices #302

@js-ojus

Description

@js-ojus

Hello @odeke-em!

Thank you for the new release that uses boltdb for storing indices.

To test the new release (v0.2.6), I removed .gd/indices, and issued drive index. The operation took over one hour for as few as 3,651 files.

Looking into the source code, I noticed (in config/config.go) that all index operations open and close the database for each index. This is, evidently, very inefficient.

Fortunately, boltdb provides a batching operation Batch() to handle such scenarios. Please look into the possibility of grouping multiple index operations.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions