Skip to content

App compilation timing#245

Draft
dido18 wants to merge 16 commits intomainfrom
upload-timing
Draft

App compilation timing#245
dido18 wants to merge 16 commits intomainfrom
upload-timing

Conversation

@dido18
Copy link
Contributor

@dido18 dido18 commented Feb 12, 2026

Motivation

Test the decrease of the compilation using the arduino-cli arduino/arduino-cli#2961 (comment)

Calculate the timing of the three steps

  1. arduino-cli init : ~1.5 seconds
  2. arduino-cli compile (see difference below)
  3. arduino-cli upload (ram) 6-7 seconds

The compile timings are the following, based on different scenarios

Scenario arduino-cli 1.4.1 arduino-cli PR #2961 arduino-cli PR #3105
First compile ~1m40s ~1m40s ~1m40s
Compile (sketch changed) ~30–40s ~30–40s ~30-40s
Compile (sketch unchanged) ~30–40s ~6–7s ~1s

Change description

Additional Notes

Reviewer checklist

  • PR addresses a single concern.
  • PR title and description are properly filled.
  • Changes will be merged in main.
  • Changes are covered by tests.
  • Logging is meaningful in case of troubleshooting.

@dido18
Copy link
Contributor Author

dido18 commented Feb 12, 2026

This is the companion issue to check the time to compile a sketch into the board arduino/arduino-cli#2961 (comment)

  • command arduino-app-cli app start user:scratch-arduino-app --log-level=info

On board

With arduino-cli 1.4.1

1st run

-  INFO arduino-cli init completed duration=1.249965538s
-  INFO arduino-cli compile completed duration=1m39.797685934s
-  INFO arduino-cli upload (ram) completed duration=6.920289734s

2nd run

-  INFO arduino-cli init completed duration=1.27567175s
-  INFO arduino-cli compile completed duration=34.020548559s
-  INFO arduino-cli upload (ram) completed duration=6.843204067s

3rd run

INFO arduino-cli init completed duration=1.278461544s
INFO arduino-cli compile completed duration=33.523823675s
INFO arduino-cli upload (ram) completed duration=6.83991578s

with arduino-cli 0.4.2 XXX

rm -rf .cache/ && arduino-app-cli app start user:scratch-arduino-app --log-level info

1st run

2026/02/13 10:57:19 INFO arduino-cli init completed duration=1.223487315s
2026/02/13 10:59:01 INFO arduino-cli compile completed duration=1m41.83323615s
2026/02/13 10:59:08 INFO arduino-cli upload (ram) completed duration=6.821932623s

2nd run

2026/02/13 11:01:58 INFO arduino-cli init completed duration=1.274086375s
2026/02/13 11:02:15 INFO arduino-cli compile completed duration=17.301468765s
2026/02/13 11:02:22 INFO arduino-cli upload (ram) completed duration=6.840720267s

3rd

2026/02/13 11:05:01 INFO arduino-cli init completed duration=1.243830519s
2026/02/13 11:05:07 INFO arduino-cli compile completed duration=6.020854974s
2026/02/13 11:05:14 INFO arduino-cli upload (ram) completed duration=6.829373269s

4th

2026/02/13 11:06:31 INFO arduino-cli init completed duration=1.227051477s
2026/02/13 11:06:37 INFO arduino-cli compile completed duration=6.043601243s
2026/02/13 11:06:44 INFO arduino-cli upload (ram) completed duration=6.824612425s

using Applab with 0.4.2-xxxx

1st compilation: 1m40

Feb 13 11:28:58 didoi arduino-app-cli[6833]: 2026/02/13 11:28:58 INFO arduino-cli init completed duration=1.310814348s
Feb 13 11:30:40 didoi arduino-app-cli[6833]: 2026/02/13 11:30:40 INFO arduino-cli compile completed duration=1m42.386061684s
Feb 13 11:30:47 didoi arduino-app-cli[6833]: 2026/02/13 11:30:47 INFO arduino-cli upload (ram) completed duration=6.848861146s

A file is edited: 30s

Feb 13 11:20:00 didoi arduino-app-cli[6833]: 2026/02/13 11:20:00 INFO arduino-cli init completed duration=1.29211581s
Feb 13 11:20:34 didoi arduino-app-cli[6833]: 2026/02/13 11:20:34 INFO arduino-cli compile completed duration=34.292129436s
Feb 13 11:20:41 didoi arduino-app-cli[6833]: 2026/02/13 11:20:41 INFO arduino-cli upload (ram) completed duration=6.885485761

NO sketch edit: 6-7seconds

Feb 13 11:25:22 didoi arduino-app-cli[6833]: 2026/02/13 11:25:22 INFO arduino-cli init completed duration=1.30363116s
Feb 13 11:25:28 didoi arduino-app-cli[6833]: 2026/02/13 11:25:28 INFO arduino-cli compile completed duration=6.278227968s
Feb 13 11:25:35 didoi arduino-app-cli[6833]: 2026/02/13 11:25:35 INFO arduino-cli upload (ram) completed duration=6.852994717

@Xayton Xayton changed the title timing App compilation timing Feb 13, 2026
@Xayton
Copy link
Contributor

Xayton commented Feb 16, 2026

@dido18 it would be nice to also compare the "compile an unchanged sketch" vs "compile a changed sketch".
Those are two different, but both interesting cases:

  • in one case you are working on the sketch code, and that is the time you wait to recompile and upload each change
  • in the other case your sketch does not change, are you are probably working on the Python code

@dido18
Copy link
Contributor Author

dido18 commented Feb 16, 2026

@dido18 it would be nice to also compare the "compile an unchanged sketch" vs "compile a changed sketch". Those are two different, but both interesting cases:

  • in one case you are working on the sketch code, and that is the time you wait to recompile and upload each change
  • in the other case your sketch does not change, are you are probably working on the Python code

With 1.4.1

The "compile unchanged sketch" and "compile a changed sketch" take around ~30-40 seconds

With 1.4.2.xxx

  • "compile a changed sketch": 30-40 seconds
  • "compile unchanged sketch": around 7seconds

I will update the PR with a table summarising with the timing

dido18 and others added 12 commits February 18, 2026 15:52
* chore: update arduino-cli to master(ea956a3992b4)

* fixup! chore: update arduino-cli to master(ea956a3992b4)

* update licences

* fixup! update licences

* fix httpfv license
* fix accelerometers cateogory

* update project category from EI to arduino

* add test

* Update internal/orchestrator/models.go

Co-authored-by: Davide <davideneri18@gmail.com>

* Update internal/orchestrator/models.go

Co-authored-by: Davide <davideneri18@gmail.com>

* Update internal/orchestrator/models.go

Co-authored-by: Davide <davideneri18@gmail.com>

* Update internal/orchestrator/models.go

Co-authored-by: Davide <davideneri18@gmail.com>

* table test

* test all cateogories

* Update internal/orchestrator/models.go

Co-authored-by: Davide <davideneri18@gmail.com>

---------

Co-authored-by: Davide <davideneri18@gmail.com>
* Resolve gid using the host values.

* Use numeric values for all groups.

* always add groups

* Move groups from string to uint32.

* Fix lint.

* Update internal/orchestrator/provision.go

Co-authored-by: Luca Rinaldi <l.rinaldi@arduino.cc>

* Address reiew.

* Apply suggestion from @lucarin91

Co-authored-by: Luca Rinaldi <l.rinaldi@arduino.cc>

---------

Co-authored-by: lucarin91 <lucarin@protonmail.com>
Co-authored-by: Luca Rinaldi <l.rinaldi@arduino.cc>
* feat: add gotestsum installation and update test commands; enhance error response models

* feat: add gotestsum installation to Go test workflows

* fix: correct expected output for empty build id in TestParseOSImageVersion

* refactor: simplify InstallEIModel parameters and remove unused error response models

* refactor: update gotestsum installation and usage in Taskfile; add new dependencies

* refactor: remove gotestsum installation steps from Go test workflows
* deprecate the `required_devices` field from the `app.yaml`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants