Dependency graph extremely long before compilation in VScode ESP32

I have an ESP32 board and when I compile my code it is printed:

LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain+, Compatibility ~ soft
Found 49 compatible libraries 
Scanning dependencies...

This is followed by about 20s (feels endlessly) of rapid dependency graph printing like

|   |   |   |-- Adafruit BusIO @ 1.14.1
|   |   |   |   |-- Wire @ 2.0.0
|   |   |   |   |-- SPI @ 2.0.0
|   |   |   |-- Wire @ 2.0.0
|   |-- Sensor
|   |   |-- config_GPIO
|   |   |-- WiFi @ 2.0.0
|   |   |-- FS @ 2.0.0
|   |   |-- SD @ 2.0.0
|   |   |   |-- FS @ 2.0.0
|   |   |   |-- SPI @ 2.0.0
|   |   |-- SPI @ 2.0.0
|   |   |-- ArduinoJson @ 6.20.0
|   |   |-- MQTT @ 2.5.0
|   |   |-- WiFiClientSecure @ 2.0.0
|   |   |   |-- WiFi @ 2.0.0
|   |   |-- FreqCountESP @ 1.0.0
|   |   |-- Adafruit ADS1X15 @ 2.4.0
|   |   |   |-- Adafruit BusIO @ 1.14.1
|   |   |   |   |-- Wire @ 2.0.0
|   |   |   |   |-- SPI @ 2.0.0
|   |   |   |-- Wire @ 2.0.0
|   |   |-- Adafruit BusIO @ 1.14.1
|   |   |   |-- Wire @ 2.0.0
|   |   |   |-- SPI @ 2.0.0
|   |   |-- Wire @ 2.0.0
|   |-- HTTPClient @ 2.0.0
|   |   |-- WiFi @ 2.0.0
|   |   |-- WiFiClientSecure @ 2.0.0
|   |   |   |-- WiFi @ 2.0.0
|-- Update @ 2.0.0
|-- HTTPClient @ 2.0.0
|   |-- WiFi @ 2.0.0
|   |-- WiFiClientSecure @ 2.0.0
|   |   |-- WiFi @ 2.0.0

This is how my project explorer looks like:

I also noticed, that this long dependency listing did not happen on another PC of mine, though for the exact same code…
Any idea, why this is happening? If you need any more info about my project structure just let me now.

Besides, I noticed that even when I compiled my code successfully and then click on upload, the code is compiled again and only afterwards uploaded. Any idea why this is happening?

Which was running what version of the PlatformIO core? (pio --version in CLI).

5 days ago there has been a change to the default output behavior: Add the ability to disable the output of the library tree in the terminal when compiling the project · Issue #4517 · platformio/platformio-core · GitHub

Can you use the CLI + pio upgrade --dev and retry?

Hey upgrading did the trick. Besides, this is the version of pio on my other PC: PlatformIO Core, version 6.1.7a3

Could you try to run in verbose mode?

pio run -v

Do you see any Circular dependencies detected warnings?