Why is the first query time slower than subsequent queries? #488
-
I did a demo to test the performance of microstream. Class root:
Class Group:
Class Project:
Class Employee:
I try the query to find all projects with the code below:
Test results with 300,000 groups and each group has 2 projects. I config with 1 channel. When I upload data and run it 4 times in a row:
Why does the first time take longer? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The executed Java code gets faster at runtime because of optimization done by the JIT compiler of the JVM. After your data was loaded into memory, MicroStream isn't involved anymore when querying or traversing your object graph. This is pure JVM power. |
Beta Was this translation helpful? Give feedback.
The executed Java code gets faster at runtime because of optimization done by the JIT compiler of the JVM. After your data was loaded into memory, MicroStream isn't involved anymore when querying or traversing your object graph. This is pure JVM power.