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

[WIP] try turning on Blackbird optimizer for Jackson #2547

Draft
wants to merge 8 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conjure-java-jackson-optimizations/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ apply plugin: 'com.palantir.revapi'

dependencies {
api "com.fasterxml.jackson.core:jackson-databind"
implementation "com.fasterxml.jackson.module:jackson-module-afterburner"
implementation "com.fasterxml.jackson.module:jackson-module-blackbird"
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package com.palantir.conjure.java.jackson.optimizations;

import com.fasterxml.jackson.module.afterburner.AfterburnerModule;
import com.fasterxml.jackson.module.blackbird.BlackbirdModule;
import java.util.List;

/**
Expand All @@ -37,7 +37,7 @@ public final class ObjectMapperOptimizations {

@SuppressWarnings("AfterburnerJavaIncompatibility")
public static List<? extends com.fasterxml.jackson.databind.Module> createModules() {
return NO_OPTIMIZATIONS ? List.of() : List.<com.fasterxml.jackson.databind.Module>of(new AfterburnerModule());
return NO_OPTIMIZATIONS ? List.of() : List.<com.fasterxml.jackson.databind.Module>of(new BlackbirdModule());
}

private ObjectMapperOptimizations() {}
Expand All @@ -47,7 +47,7 @@ private ObjectMapperOptimizations() {}
* restricted by https://openjdk.java.net/jeps/396 and https://openjdk.java.net/jeps/403.
*/
private static boolean shouldDisableByDefault() {
return Runtime.version().feature() >= 16;
return false;
}

private static boolean readProperty(String property, boolean defaultValue) {
Expand Down
6 changes: 3 additions & 3 deletions versions.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Run ./gradlew --write-locks to regenerate this file
com.fasterxml:classmate:1.5.1 (1 constraints: 9a122a13)
com.fasterxml.jackson.core:jackson-annotations:2.14.2 (9 constraints: 3ab6ba5c)
com.fasterxml.jackson.core:jackson-core:2.14.2 (13 constraints: f7254e86)
com.fasterxml.jackson.core:jackson-databind:2.14.2 (20 constraints: c38ce552)
com.fasterxml.jackson.core:jackson-core:2.14.2 (13 constraints: f52446fa)
com.fasterxml.jackson.core:jackson-databind:2.14.2 (20 constraints: c18bcc8f)
com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.14.2 (2 constraints: 2d20b805)
com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.14.2 (1 constraints: 3905393b)
com.fasterxml.jackson.datatype:jackson-datatype-guava:2.14.2 (1 constraints: 3905393b)
Expand All @@ -11,7 +11,7 @@ com.fasterxml.jackson.datatype:jackson-datatype-joda:2.14.2 (1 constraints: 3905
com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.14.2 (1 constraints: 3905393b)
com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-base:2.14.2 (1 constraints: f51af942)
com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-cbor-provider:2.14.2 (1 constraints: 3905393b)
com.fasterxml.jackson.module:jackson-module-afterburner:2.14.2 (1 constraints: 3905393b)
com.fasterxml.jackson.module:jackson-module-blackbird:2.14.2 (1 constraints: 3905393b)
com.fasterxml.jackson.module:jackson-module-jakarta-xmlbind-annotations:2.14.2 (2 constraints: e3308eb3)
com.fasterxml.jackson.module:jackson-module-scala_2.12:2.14.2 (1 constraints: 3905393b)
com.github.ben-manes.caffeine:caffeine:3.1.4 (3 constraints: e22362a2)
Expand Down