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

Reduces the core jar from 272 to 188k by tuning codec and shade #1236

Merged
merged 2 commits into from
Aug 15, 2016

Conversation

codefromthecrypt
Copy link
Member

Before, we used more reflection than necessary in codec. This implied
use of larger and more classes than we actually need. By slightly
changing codec, and manually controlling shade, we dropped the jar size
by 45%.

@codefromthecrypt
Copy link
Member Author

Motivation for this is to lower barrier for tracers to include zipkin's standard library without resorting to extracting a separate "model jar"

@@ -26,7 +26,7 @@ Check out the [`zipkin-server`](/zipkin-server) documentation for configuration
## Core Library
The [core library](https://github.com/openzipkin/zipkin/tree/master/zipkin/src/main/java/io/zipkin) requires minimum language level 7. While currently only used by the server, we expect this library to be used in native instrumentation as well.

This includes built-in codec for both thrift and json structs. Direct dependencies on thrift or moshi (json library) are avoided by minifying and repackaging classes used. The result is a 256k jar which won't conflict with any library you use.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lie.. we actually crept up to 272K! I wrote in 190, not 188, to give a little room :)

@codefromthecrypt codefromthecrypt force-pushed the minify-more branch 2 times, most recently from 916af96 to b1ecb40 Compare August 14, 2016 12:12
Before, we used more reflection than necessary in codec. This implied
use of larger and more classes than we actually need. By slightly
changing codec, and manually controlling shade, we dropped the jar size
by 45%.
@codefromthecrypt codefromthecrypt force-pushed the minify-more branch 2 times, most recently from 6ed6a3b to a596e0e Compare August 14, 2016 23:23
This reduces load on cassandra test in attempts to help with travis.

See #1237
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant