Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update jmdns to 3.5.1 #5879

Merged
merged 4 commits into from
Feb 10, 2017
Merged

Update jmdns to 3.5.1 #5879

merged 4 commits into from
Feb 10, 2017

Conversation

facchinm
Copy link
Member

Evaluate if d403c9a and 944dcf1 are needed to solve #4569 or if updating to 3.5.1 is enough

@mastrolinux mastrolinux added the in progress Work on this item is in progress label Jan 19, 2017
@facchinm
Copy link
Member Author

facchinm commented Jan 19, 2017

Hi @docbender, could you test the build which will be produced on your PC with 5 network cards? Thanks a lot!

@facchinm facchinm added the Component: IDE The Arduino IDE label Jan 20, 2017
@docbender
Copy link

Hello @facchinm,
I tried new build, but it failed to start. Tested on 2 PC's. Both same. Here is program output:

Loading configuration...
Initializing packages...
java.lang.NoClassDefFoundError: javax/jmdns/ServiceListener
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at cc.arduino.packages.DiscoveryManager.<init>(DiscoveryManager.java:44)
        at processing.app.BaseNoGui.initPackages(BaseNoGui.java:495)
        at processing.app.Base.<init>(Base.java:257)
        at processing.app.Base.main(Base.java:140)
Caused by: java.lang.ClassNotFoundException: javax.jmdns.ServiceListener
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 16 more

@facchinm
Copy link
Member Author

Sorry for the inconvenience, the Windows package was missing an entry in the classpath; I just pushed a commit to fix this, which should trigger a new build. Thanks again for testing!

@docbender
Copy link

Here are CPU tests with new build. Build 643 with 6 active network card:

image

Compared with Arduino 1.8.1 CPU utilization looks similar. I both cases one core is almost full utilized:

image

Here is another system (4 thread Core-i5) with 3 network cards. In a direct comparison, it seems that with the new nDNS load is same or a little bit higher:

image

@facchinm
Copy link
Member Author

facchinm commented Jan 23, 2017

Thanks a lot for testing this, I was hoping that simply upgrading the library would solve the issue but I was wrong 🙂 I'm pushing some other commits to this PR to solve the high cpu usage once for all (by using some new features of jmdns)

use jmmdns to simplyfy the code and automatically take care of interfaces switching
@docbender
Copy link

Now it looks much better. Nice work. There are now peeks in 10s period and when network subsystem has changed.

image

@facchinm facchinm added this to the Release 1.8.2 milestone Feb 8, 2017
@facchinm facchinm changed the title [WIP] Update jmdns to 3.5.1 Update jmdns to 3.5.1 Feb 8, 2017
@facchinm
Copy link
Member Author

facchinm commented Feb 8, 2017

@me-no-dev @igrr would you mind testing this PR with ESP8266 and ESP32 boards advertising via mDNS? If you see no regression (or maybe an improvement) I believe we can merge this

@me-no-dev
Copy link
Contributor

@facchinm will do right away on both ESPs :)

@me-no-dev
Copy link
Contributor

@facchinm I can confirm no regression on ESP8266 and ESP32. I can also confirm lower load on the network.
I've been waiting for a long time for this :) I even remember looking into it while working on the ESP OTA, but found the cause to be somewhere in the lib itself as I was seeing the same behavior on Android and Eclipse. I'll monitor the situation, but so far, so good :)
Great work!

@facchinm facchinm merged commit e9e24bd into arduino:master Feb 10, 2017
@mastrolinux mastrolinux removed the in progress Work on this item is in progress label Feb 10, 2017
@cmaglie cmaglie deleted the better-mdns branch February 24, 2017 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: IDE The Arduino IDE
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants