By default, XCC reads the entire response (cached mode)
and buffers it in a ResultSequence object.  XCC may also
operate in streaming (non-cached) mode, which is intended
for situations where the result will be large and you do
not need it all in memory at once.

   Use a RequestOptions object with the Request and set
the CacheResult property to false.  When using streaming
results it's important to remember to close the ResultSequence
object when you are finished with it.  While open, a
streaming ResultSequence is holding an active connection.

   It's also important to read the result in a timely
manner.  If you wait too long between fetching individual
results, the server may close the connection as being idle.
The amount of time the server will wait for output to be
read is set in the Admin UI as "request timeout".

   See: http://developer.marklogic.com/pubs/4.0/dotnet/index.html

On Feb 19, 2009, at 1:33 AM, Soumadri_Roy wrote:

Hi,

I used XCC/.Net APIs but to improve application performance, I tried initiating a web request to an XQY script (hosted in Marklogic HTTP server) . And then reading the web response via the HTTP stream chunk by chunk using .Net Framework APIs. This gave me tremendous performance improvement in terms of showing the results to the user (11 secs for XCC against .118 ms for invoking XQY over HTTP). My result had approx. 18000 elements each with around 600 characters.

Dissecting the application revealed that, the major time is eaten to accumulate the results into one object (e.g. ResultSequence in case of XCC / string object in case of HTTP request). This can be reduced if I read the results in pieces.

Is there any way to read the results chunk by chunk in XCC API?

Thanks and Regards

Soumadri Roy
Mobile: 09986832356
<image001.gif>




DISCLAIMER:
This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated.
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

---
Ron Hitchens {[email protected]}  650-655-2351




_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to