Go Down

Topic: [Guide] Fix Arduino IDE slowdown in Windows & replace the ugly Win7 taskbar icon (Read 5516 times) previous topic - next topic


-Arduino IDE takes too long to start
-Arduino IDE takes too much to open the "Tools" menu

http://servicios.ried.cl/arduino/temp/rxtxSerial-2.2_fixed_2009-03-17.rar (replace the dll file)

How it works?:

-Arduino IDE icon looks ugly (16x16 image upscaled to the taskbar size icon) in Windows 7

http://servicios.ried.cl/arduino/temp/windows7_arduino-0022_fix.rar (Instructions inside)

How it works?:
Nullifing the SetIcon function inside Base.class (pde.jar), then replacing some resources in the java binaries to let Windows 7 handle the icon the correct way, take a peek to the final result:

More stuff: http://servicios.ried.cl/
My website: http://ried.cl


does seem to be faster :clap hands:

now if only you could make the little red x ALT-F4 do the same as CTRL-Q (remember file and window size) everything would be wonderful :)
there are only 10 types of people
them that understands binary
and them that doesn't


My website: http://ried.cl


This works great! I used it on vista home premium and arduino0022.


eried: can you attach a patch for the changes you made to RXTX to the issue you opened for this (http://code.google.com/p/arduino/issues/detail?id=200)?  If I get a chance, I'll try to include RXTX in the Arduino repository and apply this fix to the source code there and the DLL we ship.

Similarly, can you open an issue with patch for the icon fix?  The current approach is a bit of a hack.  :)


Nice, attaching and opening issue right now.

The problem with the icon I think is just the resource size (ICON_IMAGE):

Code: [Select]
public static void setIcon(Frame frame)
    Image image = Toolkit.getDefaultToolkit().createImage(PApplet.ICON_IMAGE);

But I haven't fixed the java code (as you said I just 'hacked' the class/jar bytecode).
My website: http://ried.cl

I know this slowdown has supposedly been fixed by fixing the underlying RXTX library.  But, I recently had the Tools menu hang on Linux (Ubuntu 11.10/ Arduino 0021 or 0022, I think).  So I got the Arduino GUI code and made my own workaround.  Then, the slowdown disappeared on me.  But I feel the following is a still a good addition to the Arduino GUI code and I don't know the proper way to submit it, so I'm posting it here.  I changed the Editor.java file as follows:

I added the static member variable processing.app.Editor.expectedPortCount around line 100:

[font=Verdana] static JMenu serialMenu;
  static int expectedPortCount = 5; // serial port search progress bar

  static SerialMenuListener serialMenuListener;

I added a ProgressMonitor to processing.app.Editor.populateSerialMenu() which starts around line 959:

[font=Verdana]protected void populateSerialMenu() {
    // getting list of ports

    JMenuItem rbMenuItem;

    //System.out.println("Clearing serial port menu.");
    boolean empty = true;

      ProgressMonitor progressMonitor = new ProgressMonitor(this,
        "Searching for serial ports", "", 0, 100);
      int portCount = 0;
      int serialPortCount = 0;

      for (Enumeration enumeration = CommPortIdentifier.getPortIdentifiers();
        enumeration.hasMoreElements() && !progressMonitor.isCanceled();)
        CommPortIdentifier commportidentifier = (CommPortIdentifier)enumeration.nextElement();
        //System.out.println("Found communication port: " + commportidentifier);
        if (commportidentifier.getPortType() == CommPortIdentifier.PORT_SERIAL)
          //System.out.println("Adding port to serial port menu: " + commportidentifier);
          String curr_port = commportidentifier.getName();
          rbMenuItem = new JCheckBoxMenuItem(curr_port, curr_port.equals(Preferences.get("serial.port")));
          empty = false;
        progressMonitor.setNote(String.format("Found: %d total comm ports   %d serial ports\n",
          portCount, serialPortCount));

      if (!empty) {
        //System.out.println("enabling the serialMenu");
      expectedPortCount = (portCount > 0) ? portCount : 5;


    catch (Exception exception)
      System.out.println(_("error retrieving port list"));
    if (serialMenu.getItemCount() == 0) {


The ProgressMonitor dialog box only opens if there is a 500 ms delay or more.


Hi !

rxtxSerial.dll replacement still a working fix with Arduino 023.

Thanks a lot eried !


Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131