You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using 3.2.1 version of SDK in a Java application. When I run a unit test doing several parse calls in a row, I see that the very first call is taking significantly more time than the rest.
Here's a function called by the unit test several times in a loop:
protected static String tsv2json(String sourceEventInTsv) {
long startTime = System.currentTimeMillis();
Validated<ParsingError, Event> validatedEvent = Event.parse(sourceEventInTsv);
long endTime = System.currentTimeMillis();
long executionTime = endTime - startTime;
System.out.println("Execution time in milliseconds: " + executionTime);
if (validatedEvent.isValid()) {
Event event = validatedEvent.toOption().get();
return event.toJson(true).noSpaces();
}
throw new InvalidSnowplowEvent(String.format("Invalid Snowplow event in TSV [%s]: %s",
validatedEvent.toString(), sourceEventInTsv));
}
The test is run on a new M3 Mac, openJDK@21, for example:
Execution time in milliseconds: 173
Execution time in milliseconds: 1
Execution time in milliseconds: 2
Execution time in milliseconds: 1
Execution time in milliseconds: 2
Execution time in milliseconds: 2
Execution time in milliseconds: 1
Execution time in milliseconds: 1
Execution time in milliseconds: 1
The TSV fixture strings are about 4000-6000 chars length.
Could you please take a look and let me know if there's something wrong here. Thank you.
The text was updated successfully, but these errors were encountered:
Hi guys,
I'm using 3.2.1 version of SDK in a Java application. When I run a unit test doing several parse calls in a row, I see that the very first call is taking significantly more time than the rest.
Here's a function called by the unit test several times in a loop:
The test is run on a new M3 Mac, openJDK@21, for example:
Execution time in milliseconds: 173
Execution time in milliseconds: 1
Execution time in milliseconds: 2
Execution time in milliseconds: 1
Execution time in milliseconds: 2
Execution time in milliseconds: 2
Execution time in milliseconds: 1
Execution time in milliseconds: 1
Execution time in milliseconds: 1
The TSV fixture strings are about 4000-6000 chars length.
Could you please take a look and let me know if there's something wrong here. Thank you.
The text was updated successfully, but these errors were encountered: