Uploaded image for project: 'Reporting Module'
  1. Reporting Module
  2. REPORT-677

ObjectFormatter slows down reports significantly

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: TBD
    • Resolution: Fixed
    • Affects Version/s: Reporting 0.9.0
    • Fix Version/s: Reporting 0.9.1
    • Component/s: None
    • Labels:
      None
    • Complexity:
      Undetermined

      Description

      Formatting OpenmrsMetadata (and perhaps other elements) with the ObjectFormatter slows down report processing significantly.

      For instance, if I have a report with ~100,000 rows, then if I define the following column, it takes approx 5 minutes to evaluate that column:

      dsd.addColumn("location", new ConvertedEncounterDataDefinition(new EncounterLocationDataDefinition(), new ObjectFormatter(), null);  
      

      If I define the column like this, it only takes seconds:

       dsd.addColumn("location", new ConvertedEncounterDataDefinition(new EncounterLocationDataDefinition(), new PropertyConverter(String.class, "name")), null);  
      

      One would guess that either the fetching of the locale global property and/or the processing of message.codes via the message source service contribute to this slowdown

        Attachments

          Activity

            People

            Assignee:
            darius Darius Jazayeri
            Reporter:
            mogoodrich Mark Goodrich
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 6 hours
                6h