So I have prototyped the same application in both ...
# random
g
So I have prototyped the same application in both Kotlin and Java (https://github.com/GavinRay97/GraphQLCalcite) For some reason, the Kotlin version is significantly slower than the Java implementation It's a latency sensitive application, in Kotlin the query execution pipeline takes about ~24ms for a depth-2, basic query In Java, it's closer to 13ms. Are there any big no-no's to keep in mind? I've tried to even stay to using
for (x in y)
loops etc and mutable collections and whatnot.
r
Without digging into the source code, I'd say your best bet is to lok into Java/Kotlin performance profiling. e.g. https://www.baeldung.com/java-profilers
👌 1
🙏 1
g
I'll run Async Profiler and dig through JFR recording then I suppose
r
Interesting — is there a specific class or function between the two where that was happening? I'm just curious.
g
Ah no it was entirely user fault, there was a minute difference in the business logic implementation in one method that led to an object being cached 😅
r
Ah, well I'm glad you were able to figure it out. I think you were asking the right questions — even if it didn't end up being some strange compilation or bytecode discrepancy. 🙂