rnewson commented on issue #4995:
URL: https://github.com/apache/couchdb/issues/4995#issuecomment-1969500836

   are you perhaps buffering the entire response before processing it when not 
using feed=continuous? the response format is different, you see. for 
continuous we send a series of json objects separated by newlines. for normal, 
it's a single json object with all the docs within that. however we do 
intentionally put newlines between the items to make it easier to process in a 
streaming manner.
   
   normal:
   ```
   curl foo:bar@localhost:25984/db1/_changes
   {"results":[
   
{"seq":"1-g1AAAABzeJzLYWBgYMpgTmHgz8tPSTVyMDQy1zMAQsMckEQiQ1L9____sxIZcCrJYwGSDA1A6j9IZQZzImMuUIDdzMIiNS0lDVNXFgCFqx2b","id":"doc1","changes":[{"rev":"1-967a00dff5e02add41819138abb3284d"}]},
   
{"seq":"2-g1AAAACTeJzLYWBgYMpgTmHgz8tPSTVyMDQy1zMAQsMckEQiQ1L9____szKYExlzgQLsycZJyQZmSZjKcRqRxwIkGRqA1H8Uk8wsLFLTUtIwdWUBAG6aJN4","id":"doc2","changes":[{"rev":"1-967a00dff5e02add41819138abb3284d"}]},
   
{"seq":"3-g1AAAACTeJzLYWBgYMpgTmHgz8tPSTVyMDQy1zMAQsMckEQiQ1L9____szKYE5lygQLsycZJyQZmSZjKcRqRxwIkGRqA1H-oSYxgk8wsLFLTUtIwdWUBAG8EJN8","id":"doc3","changes":[{"rev":"1-967a00dff5e02add41819138abb3284d"}]}
   ],
   
"last_seq":"3-g1AAAACTeJzLYWBgYMpgTmHgz8tPSTVyMDQy1zMAQsMckEQiQ1L9____szKYE5lygQLsycZJyQZmSZjKcRqRxwIkGRqA1H-oSYxgk8wsLFLTUtIwdWUBAG8EJN8","pending":0}
   ```
   
   continuous
   ```
   curl 'foo:bar@localhost:25984/db1/_changes?feed=continuous'
   
{"seq":"1-g1AAAABzeJzLYWBgYMpgTmHgz8tPSTVyMDQy1zMAQsMckEQiQ1L9____szKYExlzgQLsycZJyQZmSZjKcRqRxwIkGRqA1H-QSYkMWQBNRh2D","id":"doc2","changes":[{"rev":"1-967a00dff5e02add41819138abb3284d"}]}
   
{"seq":"2-g1AAAABzeJzLYWBgYMpgTmHgz8tPSTVyMDQy1zMAQsMckEQiQ1L9____szKYE5lygQLsycZJyQZmSZjKcRqRxwIkGRqA1H-QSYkMWQBNkB2E","id":"doc3","changes":[{"rev":"1-967a00dff5e02add41819138abb3284d"}]}
   
{"seq":"3-g1AAAACTeJzLYWBgYMpgTmHgz8tPSTVyMDQy1zMAQsMckEQiQ1L9____szKYE5lygQLsycZJyQZmSZjKcRqRxwIkGRqA1H-oSYxgk8wsLFLTUtIwdWUBAG8EJN8","id":"doc1","changes":[{"rev":"1-967a00dff5e02add41819138abb3284d"}]}
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to