Skip to content

lazy loading licensing#1058

Open
rurkss wants to merge 2 commits into
pivotal:masterfrom
rurkss:lazy_loading_licensing
Open

lazy loading licensing#1058
rurkss wants to merge 2 commits into
pivotal:masterfrom
rurkss:lazy_loading_licensing

Conversation

@rurkss
Copy link
Copy Markdown

@rurkss rurkss commented May 12, 2025

Optimize license_finder behavior for package by skipping unnecessary activations when license info is already resolved via decisions or spec

Motivation

In Yarn v1, packages often include numerous transitive dependencies that get placed within the node_modules folder. license_finder attempts a deep scan of the file system, looking for license-related files (e.g., LICENSE, COPYING, README) in these nested folders.

This scanning process is especially expensive for deeply nested packages and can take up to 10 seconds per package in the worst case. By skipping the activation step when license information has already been resolved via decisions or spec metadata, we significantly reduce unnecessary file system traversal and improve overall performance.

@rurkss rurkss marked this pull request as draft May 12, 2025 18:34
…files are private methods in lib/license_finder/packages/manual_package.rb
@rurkss rurkss force-pushed the lazy_loading_licensing branch from d06510a to 1ffb554 Compare May 13, 2025 17:24
@rurkss rurkss marked this pull request as ready for review May 13, 2025 17:27
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.

1 participant