2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

gradle daemonを使ってEmbulk Java版プラグインを高速コンパイル

Posted at

まとめ

  • ~/.gradle/gradle.propertiesに設定を追加するだけでembulkのプラグイのコンパイルが速くなるようだ

高速化のメッセージ

Embulk 0.7以降を使っていている場合、gradleは2.6を使うようになる。
プラグインをビルドすると次のようなメッセージが表示される。「gradleデーモンを使えば、コンパイルが速くなるよとのこと。」

This build could be faster, please consider using the Gradle Daemon: https://docs.gradle.org/2.6/userguide/gradle_daemon.html

詳しい説明はここに書いてある。

Chapter 18. The Gradle Daemon

やってみた

要するにホームディレクトリの.gradle/gradle.properties
次のようなエントリを追加すれば良いようだ。

cat ~/.gradle/gradle.properties 
org.gradle.daemon=true 

次のコマンドを実行すれば上記のファイルを作成してくれる。

touch ~/.gradle/gradle.properties && echo "org.gradle.daemon=true" >> ~/.gradle/gradle.properties

ファイルを作成した後gradlew gemを実行すると次のようなメッセージが表示され、gradleのデーモンが起動する。

Starting a new Gradle Daemon for this build (subsequent builds will be faster).

デーモンが起動した状態だとコンパイルが速くなる...らしい

計測結果

自分のパッケージだと、コンパイル時間が2/3になった。embulk本体はあまり変わらなかった。

デーモン未使用 デーモン使用
15秒 10秒    
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?