Quick answer: json_parse is synchronous and blocks the frame. For big data, split it into per-record files (or chunks) and parse a few per frame, behind a loading screen.

Loading a large level-data JSON file freezes the game for a noticeable beat. json_parse runs to completion on the main thread.

Synchronous by Design

json_parse (and the older json_decode) parse the entire string in one call. There’s no built-in async JSON parse in GameMaker — a multi-megabyte file is a multi-frame hitch.

Chunk the Data

Split the export into smaller files — one per level, per zone, or per N records. Parse one chunk per frame:

// Step event of a loader object
if (chunk_index < chunk_count) {
    var txt = load_chunk(chunk_index);
    global.data[chunk_index] = json_parse(txt);
    chunk_index++;
} else {
    finish_loading();
}

Each frame does a bounded amount of work; the loading screen stays responsive.

Async File Read

Use buffer_load_async to read the file off the main thread, then parse the resulting buffer in the Async — Save/Load event. The disk read no longer blocks; only the parse does (so still chunk large parses).

Prefer Binary for Huge Data

For very large datasets, a custom binary buffer format reads far faster than JSON — no string parsing at all. Reserve JSON for human-editable config.

Verifying

Load the big data set. The loading screen animates smoothly throughout — no single-frame freeze. Total load time is similar, but it’s spread out.

“json_parse blocks. Chunk the data and parse a little each frame behind a loading screen.”

Author data as JSON for editability, but bake it to a binary buffer at build time — best of both worlds.