Uploaded image for project: 'DistributedLog'
  1. DistributedLog
  2. DL-138

Improve the 'synchronized' usage

    XMLWordPrintableJSON

Details

    • Task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      191 Methods are synchronized using the ‘synchronized’ modifier in the declaration. It is not a good programming practise to use this modifier at method level. Normally, it is more recommendable to implement synchronized code blocks inside methods. The reason is very simple. If other people modify these methods later, it will not be easy for them to realise that the entire method is synchronized. They will surely expand the method with code that is not necessary to synchronize. In the long term, the application will become more and more linear in execution, taking way less advantage of the hardware resources, and will be slower.

      https://www.kiuwan.com/blog/analyzing_distributedlog_twitter-2/

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              hustlmsp Sijie Guo
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: