Community
Chat Logs
Friday, August 7, 2026
- * stfstfm joined #java
- * vincere1 joined #java
- * Ragnor joined #java
- * acidsys joined #java
- * five618480339176 joined #java
- * fgarcia joined #java
- * kathadris joined #java
- * henbruas joined #java
- * MonsterAbyss joined #java
- * m4 joined #java
- * marcel joined #java
- * Pixi` joined #java
- * magla joined #java
- * Etoxiuq joined #java
- * Bahhumbug_ joined #java
- * Bahhumbug joined #java
- * stfstfm_ joined #java
- * tomboy64 joined #java
- * pebble joined #java
- * leppard joined #java
- * MikeBux joined #java
- * acidjnk joined #java
- * michele2 joined #java
- * fgarcia joined #java
- * [X-Scale] joined #java
- * X-Scale joined #java
- * Cae2 joined #java
- * sa02irc joined #java
- * Artea joined #java
- hassoon'morning
- * nevet joined #java
- * CodeGeek!~codegeek@about/java/CodeGeek changed the topic to: Welcome! || Read Channel Rules at https://javachannel.org/ before participating. || Paste limit is two lines; ~pastebin lists options. || No applets, please. || Minecraft, Android, and Javascript all have their own channel. || You are being logged.
- * Fiji_ joined #java
- * mixfix41 joined #java
- * MikeBux joined #java
- * Tyaku joined #java
- TyakuHello, I come here to talk about an issue, that maybe only experts from this kind of channels can help. ChatGPT/Google is not helping. We have some performance issues, when we call Singleton classes for the first time it can take a long time on some platforms. For example: `SSLContext.getInstance(TLSv1.2)` takes: 1.3s on my ARM 64 Bits Yocto board, 2.2s on a RPI 2B (ARM 32bits) with most recent raspberry pi
- TyakuOS, 20ms on a ARCH64 computer. We don't arrive to identify the cause of this delay. Hotspot/Jit is enabled, if I start with -Xint, it reduce a little (like -300ms) but not really significative.
- TyakuThis is really impacting because when we connect to the websocket server, it takes 500ms on a computer to establish the connection (from DNS discovery to the end of TLS handshake) and 7-8 seconds on Yocto board, due to many singleton classes that are involved in the process (SSLContext, etc).
- dreamrealTyaku: to some degree CPU speed is a limiting factor
- ParaLow entropy systems need to generate enough entropy for secure instantiation for crypto stuff.
- ParaRPi is afaik one of those, so it'll take a bit.
- * jamezp joined #java
- nimajeclasses get load on first use (you wouldn't want to load all classes on the classpath to then only use five), so if the class has heavy initialisation, then you will see that then
- TyakuTrustManagerFactory.getInstance("X509"): 307ms, defaultTmf.init(null): 2092ms, SSLContext.getInstance("TLSv1.2"): 968ms (in this sequence it takes less, because probably it use singleton classes that are already instanciated by something previously called).
- dreamrealTyaku: yes, this is a problem. Long-running processes are your solution, to aggregate that cost out.
- Tyakuis the source code available somewhere just to see what it does internally ? In our Yocto plateform we use openjdk 8 https://hg.openjdk.org/aarch64-port/jdk8u is one of SRC_URI, but doesn't seems to be the java code .
- dreamrealaaaagh
- dreamrealwhy java 8
- dreamrealwhich pi are you deploying to
- TyakuThis is what is available in meta-java scarthgap Yocto. On a custom board, the PI was just for testing performance, but on the PI I used JRE 25
- TyakuOn the Yocto board RZG2UL custom board, we use meta-java (scarthgap branch), which use openjdk 8. In RPI 2B (because I had only this in my hands) I used openjdk-jre-25 because 8 was not available. But on RPI 2B this it ARM32 and not 64bits, And takes 2.2s instead of 1.3s on the Yocto board and 20ms on ubuntu computer.
- dreamrealyeah, raspi2 is a POS :(
- dreamrealsorry, you might be stuck
- dreamrealbroadcom chips on the raspi2 are... not great
- TyakuThe RPI is not used to run my program, I used it just for performances tests, Here you can see the softwares that I used to do my performances tests : https://pastebin.com/ggty7xBf and some example of results
- TyakuFirst call - Yocto Board:
- TyakuWebSocketManagerImpl : Stage 'webSocket = new WebSocketClientImpl(uri)' : +342 ms
- TyakuWebSocketManagerImpl : Stage 'webSocket.setSocketFactory(getSslSocketFactory(config))' : +3412 ms (SSLContext.getInstance(), defaultTmf.init() ..)
- TyakuWebSocketManagerImpl : Stage 'onConnected()' : +3592 ms
- TyakuFirst call - PC Ubuntu:
- TyakuWebSocketManagerImpl : Stage 'webSocket = new WebSocketClientImpl(uri)' : +9 ms
- TyakuWebSocketManagerImpl : Stage 'webSocket.setSocketFactory(getSslSocketFactory(config))' : +75 ms
- TyakuWebSocketManagerImpl : Stage 'onConnected()' : +271 ms
- dreamrealplease don't paste a lot into #java
- dreamrealand yes, we're saying this is pretty normal
- TyakuCan we expect to increase these performances somehow ? Is it just, an issue with "entropy initialisation" ? Maybe it's not as simple as this. Here there is a discussion where they say that java does not use "HW acceleration" is that true ? https://stackoverflow.com/questions/42417183/100times-performance-slowdown-when-using-javax-net-ssl-sslsocket
- dreamrealTyaku: from 9 years ago, eh
- dreamrealI mean, you ARE using java 8...
- dreamrealas far as "does it use..." it depends quite heavily on specifics
- * kelt0m joined #java
- * Cae2 joined #java
- * caryhartline joined #java
- * stfstfm joined #java
- * sonOfRa joined #java
- * stfstfm_ joined #java
- * stfstfm__9745 joined #java
- * ferdna joined #java
- * Ragnor joined #java
- * monkeyPlus joined #java
- * hugdru joined #java
- * hugdru joined #java
- * hugdru joined #java
- * hugdru joined #java
- * hugdru joined #java
- * hugdru joined #java
- * kathadris joined #java
- * hugdru joined #java
- * metalmaniac joined #java
- * hugdru joined #java
- * marcel joined #java
- * Fiji joined #java
- * soulofset joined #java
- * Fiji_ joined #java
- * raj joined #java