Just got a new MacMini with M4 chip. This thing should scream, but it doesn't, not with 2.3.6 (and prior versions so I see). From double-clicking an ino file (really simple sketch) to the IDE ready for work takes 26 seconds. 18 seconds to compile a simple sketch. I just replaced my ancient iMac with this Mini and here I was thinking I’d be driving something that would blow the doors off a Tesla Plaid. IMHO something is seriously wrong with the IDE.
What image do you download?
Did you make sure your IDE is the native Apple Silicon build and not running under Rosetta?
Whilst the IDE has never been fast , this seems really bad...
This thread might be of interest,
The Apple Silicone version.
I saw somewhere recently that I was given the option to allow the IDE to search my system for related content. I chose to allow, but if it was presented to me again I would try to disallow and see if that helps. My memory precludes me from locating that dialog. Can you help?
Hi @wingsy.
Startup of Arduino IDE 2.3.6 takes 5 s on my Mac M1 Mini.
However, the performance is influenced by the number of boards platforms, libraries, and sketches you have installed, as Arduino IDE must scan them in order to get the information from which it builds its dynamic menus. For example, on my Windows machine, a minimal environment with only the "Arduino AVR Boards" and "built-in" libraries installed, and no sketches in the sketchbook folder, startup is 3 s. But with my ridiculous stress testing environment of 100 platforms, ~900 libraries, and ~800 sketches, startup is 16 s. The reason I used the Windows machine for these tests is because that is the machine where I have the "stress test" environment in place.
Something that can very significantly impact the performance of Arduino IDE is having the "Arduino › Cli: Daemon: Debug" advanced setting enabled.
This is disabled by default, and is only intended to be enabled temporarily for the purposes of troubleshooting problems with the Arduino IDE application. So it is unlikely that a normal user would have this enabled (or even know if its existence), but it is possible you might have enabled it for the purposes of troubleshooting and then forgotten to disable it after, or perhaps just happened to randomly enable it without understanding the effect while fiddling around in the advanced settings. So maybe it is worth checking:
- Press the Ctrl+Shift+P keyboard shortcut (Command+Shift+P for macOS users) to open the "Command Palette".
A menu will appear on the editor toolbar:
- Select the "Preferences: Open Settings (UI)" command from the menu.
ⓘ You can scroll down through the list of commands to find it, or type the command name in the field.
A "Settings" tab will open in the Arduino IDE main panel. - Type
arduino.cli.daemon.debugin the "Search Settings" field of the "Settings" tab. - Verify that the box under the "Arduino › Cli: Daemon: Debug" setting is unchecked.
- Close the Preferences tab by clicking its X icon.
If you found that it was checked, make sure to restart Arduino IDE after unchecking it (the setting only takes effect after restarting the IDE.
Couldn't that be a background task and it's ready when it's ready if you need it... Does it really have to lock everything up ?
Wow. 5 seconds? How did you do that?
I have a brand new system (M4 with gobs of RAM), uncluttered by anything, and just the bare minimums to allow compile & load.
CLI unchecked.
Did you add a timeMachine copy of all your files ? Is spotlight indexing running ?
I didn't do anything. It is a vanilla macOS installation with a vanilla Arduino IDE 2.3.6 installation. I have 17 platforms installed (significantly more than a normal user would have), a dozen libraries, and a couple dozen sketches.
Not yet. Once Im all set up I’ll turn loose spotlight
The only somewhat unusual thing is I have the ESET security software installed. But if anything I think that would negatively impact the performance compared to a completely stock macOS installation.
Well that’s what I have too only fewer Arduino things. Say, after you installed the IDE and ran it of the first time, did it invite you to load Rosetta? It did for me, and if I chose not to then it wouldn’t load. I was curios about that so I downloaded & installed it again. Same thing. Someone told me that perhaps it wasn’t the IDE that triggered the Rosetta warning but some of the supporting codes that were just a subset or supporting code of the IDE.
which Arduino ? how is it connected ? are you 100% sure it's a good cable ?
I’m using a new USB-C cable that came with my new monitor (Samsung 37” S8OUD). Connected straight into the Mini, no hub. Board is an Arduino Nano ESP32.
And just in case I’m doing something shaky in my code, here is that:
#define PhaseA D5
#define PhaseB D6
#define PBswitch D8
volatile int EncoderCounts ;
volatile int deltaHeading ;
volatile unsigned long Lockout ;
void setup() {
Lockout = millis();
pinMode(PhaseA, INPUT_PULLUP);
pinMode(PhaseB, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(PhaseA), AdjustCount, RISING);
}
void loop() {
int _EncoderCounts = EncoderCounts; // Use _EncoderCounts because EncoderCounts may change at any time.
if ( _EncoderCounts != 0 ) {
Serial.print(_EncoderCounts);
Serial.print(" ");
deltaHeading += _EncoderCounts;
Serial.println(deltaHeading); // Use deltaHeading to change boat heading per encoder control.
EncoderCounts = 0;
}
// Simulate other tasks in user app.
delay(10);
for (int i = 0; i <= 1000; i++) {}
delay(10);
for (int i = 0; i <= 1000; i++) {}
delay(10);
for (int i = 0; i <= 1000; i++) {}
}
// Interrupt routine.
void AdjustCount() { // IRQ from encoder PhaseA falling edge.
if ((millis() - Lockout) > 30) { // Do if last interrupt was over 20mSec ago.
Lockout = millis(); // Reset lockout timer. IRQs do nothing for next 20ms. (i.e., debounce)
if (digitalRead(PhaseB) == HIGH) { // If PhaseB high on PhaseA neg edge.
EncoderCounts++ ; // Increment EncoderCounts. (CW rotation) (Boat to steer to right)
} else {
EncoderCounts-- ; // Decrement EncoderCounts. (CCW rotation) (Boat to steer to left)
}
}
}

