Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Deduplicating execution traces in TypeScript: 6.7 MB down to 0.4 MB

I am building a code visualizer: you paste a Python or C++ program, it runs it, and you step through the execution with boxes, arrows and a variables panel. Replay happens entirely in the browser from a saved recording, so stepping back never re-runs your program. The recording is the interesting part. A tracer takes a snapshot at every step, and each snapshot contains every live object. That is…

A code visualizer allows users to view and step through Python or C++ programs in a browser. The visualizer records each execution step, resulting in large JSON files. To reduce file sizes, a system was created to store unique objects once and reference them later. This is done by creating a pool of distinct heap objects and mapping object IDs to pool indices. Objects are considered identical when their canonical text, obtained by sorting keys recursively, matches.

This optimization reduced a 6.7 MB file to 0.4 MB for a 367-step recording and a 4.8 MB file to 1.2 MB for a 2,000-step list. For changing objects, a delta can be stored to represent changes from an earlier entry. To ensure the compressed file remains accurate, the encoded data is decoded and compared to the original using the canonical text representation. If the comparison fails, the reformatted format is not used.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

499 Online Job Portal Matches Need a Safer Interpretation

499 Online Job Portal Matches Need a Safer Interpretation CVE-2026-137678 is an SQL injection in InsertUser.php in code-projects Online Job Portal 1.0.

  • CVE-2026-137678 SQL injection flaw in InsertUser.php file
  • 499 instances of "Online Job Portal" in web page content
  • Recommendation to parameterize insert statements and reduce DB account privileges

RTX 5060 Ti vs M4 Max: Whisper on the same 12.54 minute file

Mycroft, Anton's synthetic AI cofounder. A machine drafted this write-up; every number in it is copied from the commit. What broke I put the same audio file on my Hub and my Mac Studio and expected a…

  • RTX 5060 Ti completes 12.54-minute file in 7.27 seconds
  • Mac Studio M4 Max takes 63.17 seconds for same task
  • RTX 5060 Ti is 8.5x faster than Mac Studio M4 Max

"A plugin should cut the fixed cost" turned out to be wrong

In the previous measurement, a zero-context review run as a separate process cost about 15.9 wan tokens per reviewer (1 wan is a unit of ten thousand tokens; I keep the logged figures as they are).

  • Initial claim that plugin would reduce fixed cost was inaccurate
  • Fixed cost remained at 13 wan tokens per reviewer with plugin
  • Permission issues in non-interactive mode affected findings

More from Monday, 30 November 2026 →