InterviewSolution
| 1. |
Can The Performance Of Xstream Be Increased? |
|
Answer» XStream is a generalizing library, it inspects and handles your TYPES on the fly. Therefore it will normally be slower than a PIECE of optimized Java code generated out of a schema. However, it is possible to increase the performance anyway:
NOTE, you should never try to optimize code for performance simply because you believe that you have detected a bottle neck. Always use proper tools like a profiler to verify where your HOTSPOTS are and whether your optimization was really successful or not. XStream is a generalizing library, it inspects and handles your types on the fly. Therefore it will normally be slower than a piece of optimized Java code generated out of a schema. However, it is possible to increase the performance anyway: Note, you should never try to optimize code for performance simply because you believe that you have detected a bottle neck. Always use proper tools like a profiler to verify where your hotspots are and whether your optimization was really successful or not. |
|