chore: remove Serializable from all non-essential classes - #136
Merged
Merged
Conversation
Remove Serializable interface and serialVersionUID from all classes that were Serializable solely through the serialize subsystem (which has been removed in prior commits). Changes: - API interfaces: remove 'extends/implements Serializable' from NodeObject, NodeTreeWalker, CompiledScript, ProcessorProperty, ServiceCycle, Response, TemplateProcessor, ProcessorTreeWalker, PropertyConverter, ServiceProvider, PropertySet - API method signatures: Serializable -> Object for addInformalProperty, addVirtualProperty, PropertyConverter.convert() - Impl classes: remove serialVersionUID from ~90 classes no longer Serializable (processors, specification nodes, scope classes, script classes, builder classes, etc.) - StandardScope: remove explicit 'implements Serializable' - WrapFactoryImpl: remove explicit 'implements Serializable' - ProcessorDefinitionImpl: remove instanceof Serializable guard - message.properties: remove now-orphaned ProcessorDefinitionImpl.3 Retained Serializable (through non-Mayaa paths): - Exception/Error subclasses (via Throwable) - Servlet classes (via HttpServlet) - SessionScope/RequestScope and their implementations - Rhino NativeJavaObject / ScriptableObject subclasses - Jaxen DefaultNavigator / BaseXPath subclasses - TemplateBuilderImpl.AbsoluteCompareList (extends ArrayList)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
Specificationのシリアライズ機能を廃止としたい。
シリアライズ機能は、ビルドされたTemplateやPageのインスタンスをディスクに書き出して
ビルド過程を削減する目的で存在している。
下記のような期待効果が見込めた。
しかしながら、昨今のサーバ能力やJVM性能の向上、コンテナを前提としたサーバ構成など
前述の期待効果が相対的に小さくなっていたり、発揮しづらい状況になっている。
(シリアライズされたファイルをコンテナイメージに事前に焼き付けておく運用も現実的ではなくウォームアップ改善に寄与しない)
一方で、 #120 でキャッシュ制御をモダンで広く使われている Caffeineベースに変更しており、
容量のコントロールやLRUなどのキャッシュの破棄ポリシーの信頼性が向上していることから
これまでよりキャッシュ保持件数を柔軟に上げられると考える。
また、シリアライズ処理は独自のレイアウトとなっていたり、読み出しのインスタンス復元の
ロジックが複雑になっており保守の難易度が高い。
結論
現在の環境では、テンプレートエンジンの Serializable 機能は実装上不要と判断。
変更内容
Serialize subsystem 削除に伴い、Serializable インタフェースが不要となったすべてのクラスから Serializable を除去します。
Serializable→Objectに変更implements Serializableを除去implements Serializableを除去instanceof Serializableガードを除去Serializable 保持対象(必要)
テスト結果