Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-2282

Optimize Services Printer

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • webconsole-3.1.0
    • webconsole-3.1.2
    • Web Console
    • None

    Description

      When navigating through the Configuration Status tabs, the Services is a little bit slower than others (except Bundles, which is the slowest). I look at the code and it might be improved, to make is faster.

      It seems that implementation now is so slow because first it renders to JSON and then converts he data to text.

      A significant optimization can be achieved if:
      1. Skip to JSON conversion - generate the text directly from the service references.
      2. Improve usage of message formatter by using pre-parsed formatters:

      final MessageFormat format = new MessageFormat(pattern);
      ..
      format.format(object[])

      instead of: MessageFormat.format(pattern, object[])

      3. reuse one Object[] for MessageFormat - this will reduce the temporary objects


      I've also created a prototype and the performance improvement is even visible while browsing the tabs. The measured results are:
      ServicesServlet.printConfiguration(): now = 250
      ServicesConfigurationPrinter.printConfiguration(): now = 140
      ServicesServlet.printConfiguration(): now = 250
      ServicesConfigurationPrinter.printConfiguration(): now = 141
      ServicesServlet.printConfiguration(): now = 265
      ServicesConfigurationPrinter.printConfiguration(): now = 125
      ServicesServlet.printConfiguration(): now = 250

      Attachments

        Activity

          People

            v_valchev Valentin Valchev
            v_valchev Valentin Valchev
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: