Relatively recently, annotations have appeared in Java that can replace XML files that are hated by everyone. Under normal conditions, I would never have asked this question, but since I keep my project on Google App Engine, in which, due to the Loading-request, the account goes in milliseconds. I optimized the code in every possible way to make it as fast as possible (first of all, I got rid of JDO in favor of the Low-level API), but somewhere I read the opinion that annotations also reduce the application performance. Annotations in Java are slower than XML configuration files?
What does slower mean? Slower for what? At what point is slower? Do you mean slower to read? From a certain point of view, it may be slower, but on the other - faster.
In theory, there should be no difference. But when the server starts to search for annotations, the server needs to bypass all classes and look for annotations in them, while parsing one XML is easier. On the other hand, this may be required only once at server startup, so this difference in speed does not matter. Unfortunately, I can not say anything about the life cycle of bins in GAE.
Slowly happening deploy applications. However, if the application server is not configured otherwise, scanning for the presence of annotations occurs anyway.
The question is scant because annotations may to some extent increase their speed due to the writing of lines in the insides of this or that annotation itself, which is simply not found in the XML, because it is a bit difficult to answer the question