Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: option to stop LDF from running at every build #4455

Open
hamishcunningham opened this issue Nov 8, 2022 · 2 comments
Open
Labels
feature ldf Library Dependency Finder
Milestone

Comments

@hamishcunningham
Copy link

Could an option be added to pio run to turn off LDF for a build?

If I know that dependencies haven’t changed, I’d like not to take the time to run LDF by default, and so get a faster edit/compile/flash cycle.

(It doesn’t take too long, true, but when doing hundreds of builds during a coding session it adds up!)

Tnx!
H

@maxgerhardt confirmed that it doesn't currently seem possible to do this.

@ivankravets ivankravets added feature ldf Library Dependency Finder labels Jan 13, 2023
@ivankravets
Copy link
Member

LDF typically needs <1sec to resolve project dependencies. If you have a lot of header files such as icons or fonts, it can slow down the resolving process. See example at https://community.platformio.org/t/scanning-dependencies-takes-more-than-90-seconds-every-build/36901/6?u=ivankravets

How many seconds does LDF take for your project?

@ivankravets ivankravets added this to the 7.0 milestone Nov 28, 2023
@sylque
Copy link

sylque commented Mar 19, 2024

In my small project, pre-upload steps take 25 seconds, although the project is already built.

Resolving dependencies takes 15 seconds (with 3 local libs and 5 github libs):

Processing m5StickCPlus2_debug (platform: espressif32; board: m5stick-c; framework: arduino)
-----------------------------------------------------------------------------------------------------------------
Library Manager: Installing symlink:../Fusion
Library Manager: Installing symlink:../Syl
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/m5stick-c.html
PLATFORM: Espressif 32 (6.5.0) > M5Stick-C
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
 - framework-arduinoespressif32 @ 3.20014.231204 (2.0.14)
 - tool-esptoolpy @ 1.40501.0 (4.5.1)
 - tool-mkfatfs @ 2.0.1
 - tool-mklittlefs @ 1.203.210628 (2.3)
 - tool-mkspiffs @ 2.230.0 (2.30)
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain+, Compatibility ~ soft
Found 45 compatible libraries
Scanning dependencies...
Dependency Graph
|-- ArduinoEigen @ 0.3.2+sha.8f073b5
|-- SparkFun BMI270 Arduino Library @ 1.0.2+sha.09d6aaf
|-- M5StickCPlus2 @ 1.0.2+sha.de5ea6c
|-- HardwareBLESerial-ESP32 @ 1.0.0+sha.99e55e0
|-- ESP32 BLE Arduino @ 2.0.0
|-- syl
|-- sylimu
|-- ArxTypeTraits @ 0.3.1

And then this guy alone takes 10 seconds, although the project is already compiled and there's no compiler output:

Building in debug mode

--- EDIT ---
Part of my problem was that my platformio.h contained the option lib_ldf_mode = chain+ (see here for more information). Removing this line (i.e. coming back to default option lib_ldf_mode = chain) reduced the "Resolving dependencies" time from 15s to 3s.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature ldf Library Dependency Finder
Projects
None yet
Development

No branches or pull requests

3 participants