skywalking-java/apm-sniffer
Gong Dewei db54c65d09
Optimize bytebuddy type description performance (#637)
### Improve the performance of type description of byte-buddy
The goal is to get the original class description at re-transform, so as to generate consistent results when the Skywalking agent is enhanced again (including implementing the EnhancedInstance interface, auxiliary fields and methods, etc.)

The previous type description used the `AgentBuilder.DescriptionStrategy.Default.POOL_FIRST` policy to get origin type description, which slows down the application startup, due to heavy I/O operations and parsing bytecode. 

New way is to remove dynamic fields, methods and interfaces generated by SkyWalking Agent from `TypeDescription`, and **make it as origin type descripton**.

**Key feature** :  
* No need to cache `TypeDescription` objects, less memory used.
* It only applies to the re-transform class processing flow and does not affect the startup process.

**Process flow:**
1. Find `TypeDescription` from commonly used type cache, such as primitive class.
2. Delegate to `AgentBuilder.DescriptionStrategy.Default.HYBRID`
3. Wrap `TypeDescription` by `SWTypeDescriptionWrapper` , remove fields, methods, interface generated by SkyWalking. 

**Relative Issue:**  https://github.com/apache/skywalking/issues/11460
2023-11-03 09:45:28 +08:00
..
apm-agent Optimize bytebuddy type description performance (#637) 2023-11-03 09:45:28 +08:00
apm-agent-core Optimize bytebuddy type description performance (#637) 2023-11-03 09:45:28 +08:00
apm-sdk-plugin Fix Impala Jdbc URL (including schema without properties) parsing exception (#644) 2023-11-02 15:32:31 +08:00
apm-test-tools Release 9.0.0 and set 9.1.0-SNAPSHOT for next iteration (#600) 2023-08-29 11:57:56 +08:00
apm-toolkit-activation Release 9.0.0 and set 9.1.0-SNAPSHOT for next iteration (#600) 2023-08-29 11:57:56 +08:00
bootstrap-plugins Release 9.0.0 and set 9.1.0-SNAPSHOT for next iteration (#600) 2023-08-29 11:57:56 +08:00
bytebuddy-patch Optimize bytebuddy type description performance (#637) 2023-11-03 09:45:28 +08:00
config Add a netty-4.1.x plugin to trace http (#625) 2023-10-29 16:18:25 +08:00
optional-plugins Add a netty-4.1.x plugin to trace http (#625) 2023-10-29 16:18:25 +08:00
optional-reporter-plugins Release 9.0.0 and set 9.1.0-SNAPSHOT for next iteration (#600) 2023-08-29 11:57:56 +08:00
pom.xml Release 9.0.0 and set 9.1.0-SNAPSHOT for next iteration (#600) 2023-08-29 11:57:56 +08:00