Uploaded image for project: 'Abdera'
  1. Abdera
  2. ABDERA-277

Excessive calls to flush() on the Writer responsible for writing JSONStream data.-

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 0.4.0, 1.0, 1.1, 1.1.1
    • 1.1.2
    • None
    • Seen on Jetty7 and in local unit-tests.

    Description

      When I am creating a feed with a lot of entries, say 2-3000, the JSON serialization is horribly slow. XML serialisation is very fast in comparison.
      I am using Abdera together with Jersey, via Jersey integration.

      Using curl and Jersey content-negotiation the xml-file downloaded instantely. The json-file took as much as a minute and a half, and as little as 22 seconds.
      Some investigation lead me to the excessive calls to flush in the JSONStream-class.
      https://github.com/apache/abdera/blob/abdera-1.1.1/extensions/json/src/main/java/org/apache/abdera/ext/json/JSONStream.java

      My proposal for a fix is in the attatched patch.

      I hope someone can put this in as soon as possible. I will have to make a local "fork" for this fix until it is released through proper channels.

      Attachments

        Activity

          People

            Unassigned Unassigned
            olvesh Olve Sæther Hansen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: