We have a large class (100s of methods) that has an interface annotated with lazy loading instructions. Upon initial loading of this object and sending it to the client, we carry out a limited load on the most frequently used and latest data. We are currently using java proxying for sniffing on every call. At each call, we check "Do we have data? If there is a date parameter, did we upload data for this date?" If the answer does not correspond to any of these questions, we return to the server and load the complete object.
This works, however, java reflection, proxying and additional call overhead, such as basic getters (e.g. t20>), are detrimental to the performance of some of our code.
I want to start using a byte buddy to hope to reduce the cost of calls, especially the simple fields that always load.
What is the best way to approach this?
In addition, since this object is serialized (Java serialization, the server makes these objects and passes them to the client), what is the right way to make sure that these dynamically created classes can be transferred from the server to the client via wires?
source
share