xxffzq opened a new issue, #4267:
URL: https://github.com/apache/servicecomb-java-chassis/issues/4267

   代码本来使用了ServiceComb版本2.8.6,切换为SpringMVC 版本5.3.31后,发现有一个上传文件的接口效率下降了
   
   业务代码如下
   `
       @ResponseBody
       @PostMapping(value = "/uploadFile", produces = 
MediaType.MULTIPART_FORM_DATA)
       public Response upload1File(@NotNull MultipartFile file, 
HttpServletRequest request) {
           try (InputStream inputStream = file.getInputStream();) {
               // 具体业务
           }
       }
   `
   
   分析了火焰图,发现使用了MVC框架后,主要在这部分消耗比较多时间
   
   [40]48.31% 9,101 self: 0.02% 3 
orglapache/tomcat/util/http/fileupload/MultipartStreamSItemInputStream.makeAvailable
   .. [41]30.95% 5,830 self 0.02% 3 
org/apache/tomcat/util/http/fileupload/MultipartStreamSItemInputStream.findSeparator
   [42]30.93% 5,827 self: 30.93% 5,827 
org/apache/tomcat/util/http/fileupload/MultipartStream.findSeparator
   
   serviceComb 处理表单的方法
   
io.netty.handler.codec.http.multipart.HttpPostMultipartRequestDecoder#findMultipartDelimiter
   
   
   想问下ServiceComb在对于MultipartFile文件接口有没有做什么优化,还是说可能只是底层一个是tomcat,一个是netty的原因
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to