Skip to content

Commit

Permalink
Enable safer lazy imports on edenfsctl
Browse files Browse the repository at this point in the history
Summary:
We're currently working on a Safer version of Lazy Imports that programmatically can infer which modules are safe to load lazily and which need to be loaded eagerly.

This diff enables Safer Lazy Imports.

The import monitor shows a [p50 of 0.253 seconds of import overhead](https://fburl.com/scuba/imports_monitor_totals/6eoidai3) to optimize in our sampled runs.
Due to the sheer scope of edenfsctl's daily runs, even a 30% reduction off of the import overhead could yield 1+ EYS saved.

The marshal file is used to keep track of which files can be safely loaded lazily and which files will need to be loaded eagerly. A codemod is set up to keep the marshal file up to date.

References:
[Safer Lazy Imports Workplace Post](https://fb.workplace.com/groups/pyplat/permalink/1093600568929569)
[Safer Lazy Imports Users Wiki](https://www.internalfb.com/wiki/Python/Cinder/Onboarding/Tutorial/Lazy_Imports/Safer_Lazy_Imports/)

Reviewed By: jdelliot

Differential Revision: D67487780

fbshipit-source-id: 8b8f3bb33ba8898dcc97ecbd09663a64011541f6
  • Loading branch information
Brittany Reynoso authored and facebook-github-bot committed Jan 3, 2025
1 parent 716173f commit 8c6f63c
Showing 1 changed file with 0 additions and 0 deletions.
Binary file added eden/fs/cli/edenfsctl_strategy.marshal
Binary file not shown.

0 comments on commit 8c6f63c

Please sign in to comment.