You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@abdera.apache.org by "Olve Sæther Hansen (JIRA)" <ji...@apache.org> on 2011/01/06 13:36:45 UTC

[jira] Created: (ABDERA-277) Excessive calls to flush() on the Writer responsibler for writing JSONStream data.-

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

                 Key: ABDERA-277
                 URL: https://issues.apache.org/jira/browse/ABDERA-277
             Project: Abdera
          Issue Type: Bug
    Affects Versions: 1.1.1, 1.1, 1.0, 0.4.0
         Environment: Seen on Jetty7 and in local unit-tests.
            Reporter: Olve Sæther Hansen
            Priority: Critical


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. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ABDERA-277) Excessive calls to flush() on the Writer responsible for writing JSONStream data.-

Posted by "Dan Beaulieu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ABDERA-277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12978791#action_12978791 ] 

Dan Beaulieu commented on ABDERA-277:
-------------------------------------

What's the implication here for people who have code that doesn't set the WriterOptions to auto close the stream and then upgrades to the new jar? 

> Excessive calls to flush() on the Writer responsible for writing JSONStream data.-
> ----------------------------------------------------------------------------------
>
>                 Key: ABDERA-277
>                 URL: https://issues.apache.org/jira/browse/ABDERA-277
>             Project: Abdera
>          Issue Type: Bug
>    Affects Versions: 0.4.0, 1.0, 1.1, 1.1.1
>         Environment: Seen on Jetty7 and in local unit-tests.
>            Reporter: Olve Sæther Hansen
>            Priority: Critical
>         Attachments: Removed_unnecessary_calls_to_flush()_on_the_Writer_instance_writing_the_JSONStream_.patch
>
>
> 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. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ABDERA-277) Excessive calls to flush() on the Writer responsible for writing JSONStream data.-

Posted by "Olve Sæther Hansen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ABDERA-277?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olve Sæther Hansen updated ABDERA-277:
--------------------------------------

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

> Excessive calls to flush() on the Writer responsible for writing JSONStream data.-
> ----------------------------------------------------------------------------------
>
>                 Key: ABDERA-277
>                 URL: https://issues.apache.org/jira/browse/ABDERA-277
>             Project: Abdera
>          Issue Type: Bug
>    Affects Versions: 0.4.0, 1.0, 1.1, 1.1.1
>         Environment: Seen on Jetty7 and in local unit-tests.
>            Reporter: Olve Sæther Hansen
>            Priority: Critical
>         Attachments: Removed_unnecessary_calls_to_flush()_on_the_Writer_instance_writing_the_JSONStream_.patch
>
>
> 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. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ABDERA-277) Excessive calls to flush() on the Writer responsible for writing JSONStream data.-

Posted by "Christine Koppelt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ABDERA-277?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christine Koppelt updated ABDERA-277:
-------------------------------------

    Fix Version/s: 1.1.2

> Excessive calls to flush() on the Writer responsible for writing JSONStream data.-
> ----------------------------------------------------------------------------------
>
>                 Key: ABDERA-277
>                 URL: https://issues.apache.org/jira/browse/ABDERA-277
>             Project: Abdera
>          Issue Type: Bug
>    Affects Versions: 0.4.0, 1.0, 1.1, 1.1.1
>         Environment: Seen on Jetty7 and in local unit-tests.
>            Reporter: Olve Sæther Hansen
>            Priority: Critical
>             Fix For: 1.1.2
>
>         Attachments: Removed_unnecessary_calls_to_flush()_on_the_Writer_instance_writing_the_JSONStream_.patch
>
>
> 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. 

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (ABDERA-277) Excessive calls to flush() on the Writer responsible for writing JSONStream data.-

Posted by "Olve Sæther Hansen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ABDERA-277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12978557#action_12978557 ] 

Olve Sæther Hansen commented on ABDERA-277:
-------------------------------------------

Thanks to you too, this was quick. Hope to see the 1.1.2 as soon as possible.

> Excessive calls to flush() on the Writer responsible for writing JSONStream data.-
> ----------------------------------------------------------------------------------
>
>                 Key: ABDERA-277
>                 URL: https://issues.apache.org/jira/browse/ABDERA-277
>             Project: Abdera
>          Issue Type: Bug
>    Affects Versions: 0.4.0, 1.0, 1.1, 1.1.1
>         Environment: Seen on Jetty7 and in local unit-tests.
>            Reporter: Olve Sæther Hansen
>            Priority: Critical
>         Attachments: Removed_unnecessary_calls_to_flush()_on_the_Writer_instance_writing_the_JSONStream_.patch
>
>
> 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. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ABDERA-277) Excessive calls to flush() on the Writer responsible for writing JSONStream data.-

Posted by "ant elder (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ABDERA-277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12978479#action_12978479 ] 

ant elder commented on ABDERA-277:
----------------------------------

Patch applied, thanks for the fix Olve.
I'll give it a day or two to see if any other Abdera devs have any comments but if not then I'll do a 1.1.2 release to include the fix. 

> Excessive calls to flush() on the Writer responsible for writing JSONStream data.-
> ----------------------------------------------------------------------------------
>
>                 Key: ABDERA-277
>                 URL: https://issues.apache.org/jira/browse/ABDERA-277
>             Project: Abdera
>          Issue Type: Bug
>    Affects Versions: 0.4.0, 1.0, 1.1, 1.1.1
>         Environment: Seen on Jetty7 and in local unit-tests.
>            Reporter: Olve Sæther Hansen
>            Priority: Critical
>         Attachments: Removed_unnecessary_calls_to_flush()_on_the_Writer_instance_writing_the_JSONStream_.patch
>
>
> 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. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ABDERA-277) Excessive calls to flush() on the Writer responsible for writing JSONStream data.-

Posted by "ant elder (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ABDERA-277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12981672#action_12981672 ] 

ant elder commented on ABDERA-277:
----------------------------------

I've copied the artifacts to the live repo now so they should be available in an hour or so when that syncs up with the mirrors. 

> Excessive calls to flush() on the Writer responsible for writing JSONStream data.-
> ----------------------------------------------------------------------------------
>
>                 Key: ABDERA-277
>                 URL: https://issues.apache.org/jira/browse/ABDERA-277
>             Project: Abdera
>          Issue Type: Bug
>    Affects Versions: 0.4.0, 1.0, 1.1, 1.1.1
>         Environment: Seen on Jetty7 and in local unit-tests.
>            Reporter: Olve Sæther Hansen
>            Priority: Critical
>         Attachments: Removed_unnecessary_calls_to_flush()_on_the_Writer_instance_writing_the_JSONStream_.patch
>
>
> 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. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (ABDERA-277) Excessive calls to flush() on the Writer responsible for writing JSONStream data.-

Posted by "ant elder (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ABDERA-277?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ant elder resolved ABDERA-277.
------------------------------

    Resolution: Fixed

> Excessive calls to flush() on the Writer responsible for writing JSONStream data.-
> ----------------------------------------------------------------------------------
>
>                 Key: ABDERA-277
>                 URL: https://issues.apache.org/jira/browse/ABDERA-277
>             Project: Abdera
>          Issue Type: Bug
>    Affects Versions: 0.4.0, 1.0, 1.1, 1.1.1
>         Environment: Seen on Jetty7 and in local unit-tests.
>            Reporter: Olve Sæther Hansen
>            Priority: Critical
>         Attachments: Removed_unnecessary_calls_to_flush()_on_the_Writer_instance_writing_the_JSONStream_.patch
>
>
> 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. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ABDERA-277) Excessive calls to flush() on the Writer responsible for writing JSONStream data.-

Posted by "ant elder (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ABDERA-277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12978797#action_12978797 ] 

ant elder commented on ABDERA-277:
----------------------------------

Mmm, i'd guess they would be broken which isn't so good.

As fyi to others watching what this is about is after this change i had to update a testcase to set autoclose - http://svn.apache.org/viewvc/abdera/java/trunk/extensions/json/src/test/java/org/apache/abdera/ext/json/JSONStreamTest.java?r1=1042356&r2=1056044&sortby=date

Not sure what we can or should do about this, anyone have suggestions?

> Excessive calls to flush() on the Writer responsible for writing JSONStream data.-
> ----------------------------------------------------------------------------------
>
>                 Key: ABDERA-277
>                 URL: https://issues.apache.org/jira/browse/ABDERA-277
>             Project: Abdera
>          Issue Type: Bug
>    Affects Versions: 0.4.0, 1.0, 1.1, 1.1.1
>         Environment: Seen on Jetty7 and in local unit-tests.
>            Reporter: Olve Sæther Hansen
>            Priority: Critical
>         Attachments: Removed_unnecessary_calls_to_flush()_on_the_Writer_instance_writing_the_JSONStream_.patch
>
>
> 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. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ABDERA-277) Excessive calls to flush() on the Writer responsibler for writing JSONStream data.-

Posted by "Olve Sæther Hansen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ABDERA-277?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olve Sæther Hansen updated ABDERA-277:
--------------------------------------

    Attachment: Removed_unnecessary_calls_to_flush()_on_the_Writer_instance_writing_the_JSONStream_.patch

Patch that moves all flushes to a single flush in the JSONWriter after the structure has been written.

> Excessive calls to flush() on the Writer responsibler for writing JSONStream data.-
> -----------------------------------------------------------------------------------
>
>                 Key: ABDERA-277
>                 URL: https://issues.apache.org/jira/browse/ABDERA-277
>             Project: Abdera
>          Issue Type: Bug
>    Affects Versions: 0.4.0, 1.0, 1.1, 1.1.1
>         Environment: Seen on Jetty7 and in local unit-tests.
>            Reporter: Olve Sæther Hansen
>            Priority: Critical
>         Attachments: Removed_unnecessary_calls_to_flush()_on_the_Writer_instance_writing_the_JSONStream_.patch
>
>
> 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. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ABDERA-277) Excessive calls to flush() on the Writer responsible for writing JSONStream data.-

Posted by "ant elder (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ABDERA-277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12978813#action_12978813 ] 

ant elder commented on ABDERA-277:
----------------------------------

Thats exactly what happen, the patch wasn't appling cleanly so i had to do it manually and missed that that last change was a + not a -. I've fixed that now in r1056350 and it all builds ok now.

> Excessive calls to flush() on the Writer responsible for writing JSONStream data.-
> ----------------------------------------------------------------------------------
>
>                 Key: ABDERA-277
>                 URL: https://issues.apache.org/jira/browse/ABDERA-277
>             Project: Abdera
>          Issue Type: Bug
>    Affects Versions: 0.4.0, 1.0, 1.1, 1.1.1
>         Environment: Seen on Jetty7 and in local unit-tests.
>            Reporter: Olve Sæther Hansen
>            Priority: Critical
>         Attachments: Removed_unnecessary_calls_to_flush()_on_the_Writer_instance_writing_the_JSONStream_.patch
>
>
> 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. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ABDERA-277) Excessive calls to flush() on the Writer responsible for writing JSONStream data.-

Posted by "Olve Sæther Hansen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ABDERA-277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12981664#action_12981664 ] 

Olve Sæther Hansen commented on ABDERA-277:
-------------------------------------------

This looks good and  I have the source here, but when will 1.1.2 hit the maven repositories?

> Excessive calls to flush() on the Writer responsible for writing JSONStream data.-
> ----------------------------------------------------------------------------------
>
>                 Key: ABDERA-277
>                 URL: https://issues.apache.org/jira/browse/ABDERA-277
>             Project: Abdera
>          Issue Type: Bug
>    Affects Versions: 0.4.0, 1.0, 1.1, 1.1.1
>         Environment: Seen on Jetty7 and in local unit-tests.
>            Reporter: Olve Sæther Hansen
>            Priority: Critical
>         Attachments: Removed_unnecessary_calls_to_flush()_on_the_Writer_instance_writing_the_JSONStream_.patch
>
>
> 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. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ABDERA-277) Excessive calls to flush() on the Writer responsible for writing JSONStream data.-

Posted by "Dan Beaulieu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ABDERA-277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12978798#action_12978798 ] 

Dan Beaulieu commented on ABDERA-277:
-------------------------------------

Instead of checking the auto close option and closing, just flush() once on your way out of JSONWriter.writeTo(Base base, java.io.Writer out, WriterOptions options)

> Excessive calls to flush() on the Writer responsible for writing JSONStream data.-
> ----------------------------------------------------------------------------------
>
>                 Key: ABDERA-277
>                 URL: https://issues.apache.org/jira/browse/ABDERA-277
>             Project: Abdera
>          Issue Type: Bug
>    Affects Versions: 0.4.0, 1.0, 1.1, 1.1.1
>         Environment: Seen on Jetty7 and in local unit-tests.
>            Reporter: Olve Sæther Hansen
>            Priority: Critical
>         Attachments: Removed_unnecessary_calls_to_flush()_on_the_Writer_instance_writing_the_JSONStream_.patch
>
>
> 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. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ABDERA-277) Excessive calls to flush() on the Writer responsible for writing JSONStream data.-

Posted by "Olve Sæther Hansen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ABDERA-277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12978806#action_12978806 ] 

Olve Sæther Hansen commented on ABDERA-277:
-------------------------------------------

This was what I did in the attatched patch (look at the end of the patch-file), so that when leaving the writeTo method, the state is the samen, just with a lot less calls to flush.. ant elder must have tweaked some things in my patch. I thought this was because I did the patch against 1.1.1, and he applied it against trunk. I ran (all) the test(s) in the module before reporting this issue with the attatched patch, but in 1.1.1 that is.






> Excessive calls to flush() on the Writer responsible for writing JSONStream data.-
> ----------------------------------------------------------------------------------
>
>                 Key: ABDERA-277
>                 URL: https://issues.apache.org/jira/browse/ABDERA-277
>             Project: Abdera
>          Issue Type: Bug
>    Affects Versions: 0.4.0, 1.0, 1.1, 1.1.1
>         Environment: Seen on Jetty7 and in local unit-tests.
>            Reporter: Olve Sæther Hansen
>            Priority: Critical
>         Attachments: Removed_unnecessary_calls_to_flush()_on_the_Writer_instance_writing_the_JSONStream_.patch
>
>
> 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. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.