DEPRECATED: Implements efficient sourcemap processing for Python in Rust
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.calm
include
libsourcemap
src
tests
.dockerignore
.gitignore
.travis.yml
Cargo.toml
Dockerfile.manylinux.32
Dockerfile.manylinux.64
LICENSE
MANIFEST.in
Makefile
README.md
build-wheels.sh
build.py
docker-build.sh
setup.cfg
setup.py

README.md

DEPRECATED

This library has been deprecated in favor of Symbolic


libsourcemap

This project implements efficient sourcemap handling in Rust and wraps it for Python. It's based on rust-sourcemap for the main sourcemap handling and implements a separate format that can be cached more efficiently.

Tested with Rust 1.12 and later.

Development

This requires a recent version of pip, setuptools and Rust to build. To get rust use rustup.

To compile extension and wrappers use this with an enabled virtualenv:

make develop

Speed Benchmark

This is a benchmark against one of the sentry customer files that comes in at 30MB in size:

parse_json ... 516.52ms
  lookup_token ... 0.05ms
dump_memdb ... 217.95ms
load_memdb ... 50.87ms
  lookup_token ... 0.02ms
load_mmap ... 0.05ms
  lookup_token ... 0.03ms

Unexpectedly parsing is the slowest followed by dumping out an index in the memdb format. The latter can most likely be optimized. Looking up tokens is fast in most formats but fastest with memdb. Loading memdb via mmap gives the best loading time if the file to load is coming from the file system with a slight performance hit on actually looking up symbols.