dubbo icon indicating copy to clipboard operation
dubbo copied to clipboard

AccessLogFilter simple date format reduce instance creation

Open khanimteyaz opened this issue 7 years ago • 2 comments

AcceLogFilter message creation and last and current check was performing by each time simple date formate object creation. In this version of code I have use the ThreadLocal for each thread wise to create simple date format object instead of each call.

  • [ ] I have searched the issues of this repository and believe that this is not a duplicate.
  • [ ] I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

  • Dubbo version: 2.7.0
  • Operating System version: xxx
  • Java version: xxx

Steps to reproduce this issue

  1. xxx
  2. xxx
  3. xxx

Pls. provide [GitHub address] to reproduce this issue.

Expected Result

What do you expected from the above steps?

Actual Result

What actually happens? AcceLogFilter message creation and last and current check was performing by each time simple date formate object creation. In this version of code I have use the ThreadLocal for each thread wise to create simple date format object instead of each call. If there is an exception, please attach the exception trace:

Just put your stack trace here!

khanimteyaz avatar Dec 20 '18 11:12 khanimteyaz

Hi, I leave some comments, would u pls check it? :)

carryxyh avatar Dec 21 '18 02:12 carryxyh

Hi, I leave some comments, would u pls check it? :)

Thanks, I will.

khanimteyaz avatar Dec 21 '18 09:12 khanimteyaz