Skip to content
  • Philip Withnall's avatar
    json-parser: Support loading files via memory mapping · dd7a7112
    Philip Withnall authored
    
    
    Add a new `json_parser_load_from_mapped_file()` to load JSON from
    files via memory mapping. It’s otherwise similar to
    `json_parser_load_from_file()`. It’s in the right position to be able
    to memory map the file it’s reading from: it reads the input once
    before building a `JsonNode` structure to represent it, doesn’t write
    to the file, and often deals with large input files.
    
    This should speed things up slightly due to reducing time spent
    allocating a large chunk of heap memory to load the file into, if a
    caller can support that.
    
    Signed-off-by: default avatarPhilip Withnall <withnall@endlessm.com>
    dd7a7112