Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Sourcemaps Lookup Laravel Package

spatie/sourcemaps-lookup

Fast, memory-efficient Source Map v3 lookup for PHP. Resolve JavaScript stack frames to original source file, line/column, symbol name, and enclosing scope. Optimized for the read path and high-volume error symbolicating from uploaded sourcemaps.

View on GitHub
Deep Wiki
Context7

title: Under the hood weight: 7

The package trades eager parsing for on demand, cached parsing.

  • The raw mappings string is stored verbatim at construction.
  • A LineIndex records the byte offset of every line in mappings via a tight strpos scan.
  • On the first lookup() for a line, LineParser walks from the nearest cached VLQ state to the target line, decoding segments into a packed 20 byte per segment binary string (five signed int32s: generated column, source index, source line, source column, name index).
  • Within the line, lookup() binary searches the packed buffer by generated column, unpacking only four bytes per probe. A full segment is materialised only for the winner.
  • Parsed lines and their end of line VLQ state are cached, so later lookups on the same or later lines skip the work.

The result is that you pay for the lines you touch, and you never pay for PHP object overhead on segments you don't return.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
craftcms/url-validator
directorytree/privacy-filter-classifier
directorytree/privacy-filter
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi
splash/scopes
splash/toolkit
testo/output-teamcity
testo/bridge-symfony