Closed ivankravets closed 7 months ago
Source:
Hi Luke,
Thanks for using PlatformIO for this amazing project! š
We received a report regarding the slow compilation time of the PlatformIO project. See https://community.platformio.org/t/scanning-dependencies-takes-more-than-90-seconds-every-build/36901
The reason for this issue is a huge amount (4000+) of header files in fonts/icons folders https://github.com/lmarzen/esp32-weather-epd/tree/main/platformio/include
PlatformIO's LDF scans all these files and looks for dependencies (
#include
directive). The simplest solution is to move a ton of these headers to the private library (https://github.com/lmarzen/esp32-weather-epd/tree/main/platformio/lib) and disable LDF for it.Proposed solution
- Create a
media
folder inplatformio/lib
- Move
platformio/include/fonts
andplatformio/include/icons
folders to theplatformio/lib/media
- Create
library.json
file in theplatformio/lib/media
folder with the following contents:{ "$schema": "https://raw.githubusercontent.com/platformio/platformio-core/develop/platformio/assets/schema/library.json", "name": "media", "version": "1.0.0", "build": { "libLDFMode": "off" } }
P.S.: The
media
name is an example. You can use whatever you want.
It works! You saved my ass.
Hi Ivan,
I have implemented the proposed solution (adc388e78f033aef5ceb54b2de45d2f6e8175952). Thank you for the suggestion, it has greatly reduced the project build-time.
@lmarzen, thanks! š š
Source:
Hi Luke,
Thanks for using PlatformIO for this amazing project! š
We received a report regarding the slow compilation time of the PlatformIO project. See https://community.platformio.org/t/scanning-dependencies-takes-more-than-90-seconds-every-build/36901
The reason for this issue is a huge amount (4000+) of header files in fonts/icons folders https://github.com/lmarzen/esp32-weather-epd/tree/main/platformio/include
PlatformIO's LDF scans all these files and looks for dependencies (
#include
directive). The simplest solution is to move a ton of these headers to the private library (https://github.com/lmarzen/esp32-weather-epd/tree/main/platformio/lib) and disable LDF for it.Proposed solution
media
folder inplatformio/lib
platformio/include/fonts
andplatformio/include/icons
folders to theplatformio/lib/media
library.json
file in theplatformio/lib/media
folder with the following contents:P.S.: The
media
name is an example. You can use whatever you want.