Skip to content

[Bug]: project is too large, rustgis open big project fail #1615

Closed

Description

@CyberQin

Before you start

  • I searched the existing issues and did not find a duplicate.
  • This is a bug report, not a usage question (questions belong in Discussions).

What happened?

A project have a lot of shp /kmz / geojson,saveas project make a rgis file(>600MB), then rustgis failed to open this rgis file

Image Image

Steps to reproduce

just save a big rgis file, and open it with rustgis

Expected behavior

open and remake the whole project

How are you running RustGIS?

Desktop app (downloaded release)

Version

v0.5.0

Operating system, browser and graphics

win11, amd9950x3d

Sample data

No response

Screenshots or logs

No response

Activity

  1. added
    bugSomething isn't working
    and removed on Nov 8, 2026
  2. pick2510 commented on Nov 8, 2026

    @pick2510
    Contributor

    I'll take this one.

    What happens: RustGIS refuses to open any project file over 512 MiB (MAX_BYTES in crates/engine/src/project.rs). The project in the screenshot is 674,816 KB, about 659 MiB.

    Why the file gets that big: a layer loaded whole is written into the project feature by feature. That's every GeoJSON, KML/KMZ and GPX layer, and Shapefiles below the streaming threshold of 100,000 features. Only layers read in place are kept as a reference (large Shapefiles, GeoPackage, FlatGeobuf, GeoParquet, databases). A project with many such layers grows past the limit.

    v0.5.0 had no check on saving, so it wrote a file it couldn't reopen. Since #1364, Save refuses such a project instead. That stops new unreadable files, but a project this size still can't be saved, and the existing file still can't be opened.

    Why the limit is there: it has been 512 MiB since the first commit, as a bound against files that would exhaust memory. A project is read whole and every embedded feature is parsed into memory. The browser runs in 32-bit WebAssembly with at most 4 GiB. The number itself isn't tied to the machine, though.

    The fix I'm working on: make the project limit follow the computer's memory, as the other memory limits do since #1372 (#1291 step 2). On the desktop it allows a share of the physical memory, never below today's 512 MiB, which stays the limit in the browser and when the memory can't be read. Save and open use the same limit, so a project RustGIS saves on a machine it can also open there. When a file is past the limit, the error says the limit and that it follows the computer's memory. With that, this project should open on a machine with enough memory.

    A larger change for later, to discuss separately: save the data of layers loaded whole beside the project (a GeoPackage, for example) and read it in place, so a project is never held in memory whole.

    Until the fix lands, keeping large data in a GeoPackage and adding the layers from it keeps them out of the project file.

  3. CyberQin commented on Nov 8, 2026

    @CyberQin
    Author

    yes, thats the problem.
    and ,maybe rgis should design to use an compressed format(sqlite+geoparquet/geopackage). AI told me that rgis is not compressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions