Skip to content

Support compressed graph and IR transmission in the IR visualizer. - #4759

Merged
copybara-service[bot] merged 1 commit into
mainfrom
test_963556113
Aug 14, 2026
Merged

Support compressed graph and IR transmission in the IR visualizer.#4759
copybara-service[bot] merged 1 commit into
mainfrom
test_963556113

Conversation

@copybara-service

Copy link
Copy Markdown

Support compressed graph and IR transmission in the IR visualizer.

Fixes HTTP 413 (Payload Too Large) errors on the /graph and /run_passes
routes when visualizing or optimizing large XLS IR packages.

  • Client-side (ir_visualizer.js, ui.js): Compresses IR text using the
    browser CompressionStream API ('gzip') and sends it as 'text_gzip' in
    FormData with fallback to uncompressed text.
  • Server-side (app.py): Extracts and decompresses IR text from multipart
    FormData, raw bodies (Content-Encoding: gzip/deflate), or auto-detected
    magic bytes. Compresses JSON responses with gzip when requested by the
    client and avoids redundant Python JSON deserialization/serialization.

Comment thread xls/visualization/ir_viz/app.py Fixed
@copybara-service
copybara-service Bot force-pushed the test_963556113 branch 3 times, most recently from d288335 to 3888aef Compare August 14, 2026 18:29
Fixes HTTP 413 (Payload Too Large) errors on the /graph and /run_passes
routes when visualizing or optimizing large XLS IR packages.

- Client-side (ir_visualizer.js, ui.js): Compresses IR text using the
  browser CompressionStream API ('gzip') and sends it as 'text_gzip' in
  FormData with fallback to uncompressed text.
- Server-side (app.py): Extracts and decompresses IR text from multipart
  FormData, raw bodies (Content-Encoding: gzip/deflate), or auto-detected
  magic bytes. Compresses JSON responses with gzip when requested by the
  client and avoids redundant Python JSON deserialization/serialization.

PiperOrigin-RevId: 964816981
@copybara-service
copybara-service Bot merged commit 8ccfed9 into main Aug 14, 2026
@copybara-service
copybara-service Bot deleted the test_963556113 branch August 14, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants