Skip to content

Snapshot: layers.json bloat for service layers #50

Description

@danmaps

Problem

A simple map with only two ArcGIS Online service layers produces a 100k+ line layers.json file on snapshot. This makes the export unnecessarily large and slow to parse.

Expected Behavior

layers.json should contain a concise summary of layer metadata — not the full service definition or all sublayer details. For service layers (map services, feature services, etc.), we should export only the essential properties needed for CLI queries.

Suggested Approach

  • Identify which fields are being serialized that cause the bloat (likely full service metadata, renderer details, or field definitions)
  • Filter exported properties to a relevant subset (name, URL, type, visibility, spatial reference, etc.)
  • Consider a --full flag if users ever need the complete dump

Reproduction

  1. Create a new map in ArcGIS Pro
  2. Add two ArcGIS Online service layers
  3. Run a snapshot export
  4. Observe layers.json is 100k+ lines

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions