Closed
Description
Gary Russell opened SPR-15060 and commented
Possibly related to #19496
@SpringBootApplication
public class So41346616Application {
public static void main(String[] args) {
ConfigurableApplicationContext context = SpringApplication.run(So41346616Application.class, args);
MessageChannel annotated = context.getBean("annotated", MessageChannel.class);
MessageChannel notAnnotated = context.getBean("notAnnotated", MessageChannel.class);
Message<?> foo = new GenericMessage<>("foo");
StopWatch watch = new StopWatch();
watch.start();
for (int i = 0; i < 10000; i++) {
annotated.send(foo);
}
watch.stop();
watch.start();
for (int i = 0; i < 10000; i++) {
notAnnotated.send(foo);
}
watch.stop();
watch.start();
for (int i = 0; i < 10000; i++) {
annotated.send(foo);
}
watch.stop();
System.out.println("Annotated: " + watch.getTaskInfo()[0].getTimeMillis() +
" not: " + watch.getTaskInfo()[1].getTimeMillis() +
" second annotated: " + watch.getTaskInfo()[2].getTimeMillis());
context.close();
}
@ServiceActivator(inputChannel = "annotated")
public void with(@Payload String payload) {
}
@ServiceActivator(inputChannel = "notAnnotated")
public void without(String payload) {
}
}
Annotated: 3521 not: 36 second annotated: 11202
Yourkit pointed me to ConcurrentReferenceHashMap
and we're getting cache misses and adding new entries for each invocation.
Affects: 4.3.5
Reference URL: http://stackoverflow.com/questions/41346616/spring-boot-starter-integration-1-4-3-performance-degradation
Attachments:
- Screen Shot 2016-12-27 at 10.36.03 AM.png (247.62 kB)
- Screen Shot 2016-12-27 at 12.13.01 PM.png (187.09 kB)
Issue Links:
- Performance Issue with @ModelAttribute [SPR-15198] #19762 Performance Issue with
@ModelAttribute
("is duplicated by") - ConversionService performance regression [SPR-14929] #19496 ConversionService performance regression
- AnnotationFormatterFactory should support @AliasFor [SPR-14844] #19410 AnnotationFormatterFactory should support
@AliasFor
- Improve performance for conversions using a method parameter based type descriptor with annotations [SPR-14926] #19493 Improve performance for conversions using a method parameter based type descriptor with annotations
Referenced from: commits e38c020, 794580f
3 votes, 9 watchers