Skip to content
This repository has been archived by the owner on Aug 28, 2023. It is now read-only.
/ libsourcemap Public archive

DEPRECATED: Implements efficient sourcemap processing for Python in Rust

License

Notifications You must be signed in to change notification settings

getsentry/libsourcemap

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.

About

DEPRECATED: Implements efficient sourcemap processing for Python in Rust

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published