Skip to content

feature: memory mapped bundled files #3

@capr

Description

@capr

The current API for loading bundled files is this:

bundle.load(filename) -> string

We want to avoid creating a possibly huge string:

bundle.load(filename) -> pointer, size

For a bundled file that's trivial, but we want the same API to support loading the same file from the disk as well, transparently, so we can support transparent upgrades. For this we need to add portable support for file mmap-ing.

another cool feature would be monkey-patching the lfs API so that it transparently works with mmapped files.

and yet another feature would be accessing the file descriptor of the mmapped file so we can feed it directly to APIs that work on fds (and maybe FILE* streams too?).

Update: we already have this in fs, just need to integrate it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions