Skip to main content

Module entry_weight

Module entry_weight 

Source
Expand description

Startup import weight per runtime entry point.

For each runtime entry, the report counts the project modules and source bytes that load before the entry runs, and compares them with the modules that load only on demand or only on another thread. It also names the single imports that keep the most bytes on the startup path. The numbers come from on-disk file sizes and a traversal in FileId order, so repeated runs on the same tree give identical output.

Constants§

DOMINATING_IMPORT_LIMIT
Dominating imports reported per entry.

Functions§

compute_entry_weight
Compute the startup import weight of every runtime entry point.
entry_weight_listing
Build the listing from a module graph and the discovered files.