关于后端服务性能思考

1: BeanUtIls.copyProperties 性能问题

    BeanUtIls.copyProperties 底层是基于反射的实现,有性能问题,性能明显低于set,get方法拷贝, 10000个对象大概set,get 10毫秒以内,BeanUtIls.copyProperties 要400多毫秒

2: 关于@PathVariable的问题

    当高并发系统@PathVariable会严重影响性能,path的搜索路径:

HttpMethod > pathPattern > param > headers > consumes > produces > (Implicit (no method) vs explicit HTTP method) > custom

 

posted @ 2021-06-21 17:21  老当益壯  阅读(83)  评论(0)    收藏  举报